Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Two SQL questions - collation and unicity 14 Aug 2012 14:54 #3146

1/
I observed that are string type are defined with a collation as "latin1_swedish_ci" ?
So why this and is it the default ?

2/
How to define a table field from COOK to be declared in SQL as uniq ?

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: Two SQL questions - collation and unicity 14 Aug 2012 17:38 #3149

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
1/ What would you like ? UTF8 ? (just a question, i'm not arguing here)
2/ can't do it in cook, but simple to change.

Please Log in or Create an account to join the conversation.

Re: Two SQL questions - collation and unicity 14 Aug 2012 17:47 #3150

1/ utf8 is a good choice by default I think.
2/ phpMyadmin can do it.

Please Log in or Create an account to join the conversation.

Re: Two SQL questions - collation and unicity 14 Aug 2012 18:07 #3159

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
2/ Yes, but what happens if the user tries to input the same data again (just try it, for practicing purpose)

Please Log in or Create an account to join the conversation.

Re: Two SQL questions - collation and unicity 14 Aug 2012 18:31 #3165

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
There is no default collation imposed by Cook.
It will create from the default collation of your database.
All my components tables are in UTF8, generated by Cook.



About UNIQUE :
It will be available in 2.0, and I think also with an Ajax facultative query directly in the validator ;-)

EDIT : It is not done yet, because of the sandbox restoring datas.
If you define an UNIQUE after having inserted datas, the system can crash on restoring, so I am currently building a restoring process that will add suffixes to the datas to keep them uniques, or to skip them when impossible to add a suffix (int, fk...)
Well it is not easy to go around all kind of possibilities that the user can create :unsure:
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.063 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started