I'm not a developer of this project, so I cannot speak for it, but these are some thoughts:
Dirk Rennen wrote:
You should also consider putting html comment tags around the javascript code (<!—code //) so it wont output if javascript is turned off.
To make sure javascript is turned on, you should consider disabling all process buttons and turning them on at runtime.
Personally, I wouldn't worry about javascript checking until a 1.0 release. (And if you are forcing javascript, you should redirect to an error page post-login.) All modern browsers support parsing <script> tags even if javascript is off. The proper way to separate inline javascript from the html is as follows:
<script type="text/javascript"> //<![CDATA[ .. javascript code here ... //]]> </script>
I haven't looked at the database conventions, but what I personally always do is the following:
SELECT field FROM Table WHERE otherfield LIKE 'value' LIMIT 0,1;
As you can see sql-specific parts are in uppercase, fields in lowercase and table in ucfirst. This way you can separate what they are by simply looking how it's written.
I totally agree on uppercasing SQL keywords as most IDEs won't syntax-highlight inside strings.
PS the LIMIT 0,1 (mysql) is a faster query then without, even when you know there can only be one value returned, as it stops looking after it's found one which it wont if the limit is not there.
I disagree here -- I could be wrong, but please prove me wrong. If you *know* the query will only return one row (because your WHERE statement uses a primary key and there are no left-joins or other mechanisms to provide multiple rows) then the limit will not help. The LIMIT expression is applied after the results have been gathered. (Use 'explain' before your query to test this.)
I agree the LIMIT *is* faster when multiple rows *may* be returned. But if you only want one row out of a possible set, then the query will already have the limit statement.
Thus, adding LIMIT 1 or LIMIT 0,1 to all single-row queries is redundant.
-gnul _______________________________________________ List info: http://lists.roundcube.net/dev/