[snip]
mySQL Error: You have an error in your SQL syntax near ''LIMIT 25,25'' at
line 1

with this query:

SELECT * FROM dvd_library WHERE genre=BUDGET ORDER BY description ASC LIMIT
25,25
[/snip]

Try

SELECT * FROM dvd_library WHERE genre = 'BUDGET' ORDER BY description ASC
LIMIT 25, 25

Also (I have been seeing this a lot lately and don't know if folks are using
it to shorten up e-mails to this list or if they really do this, so I am
going to say it) it is a performance robbing and potential code buster to
use "SELECT *" where all things are selected from a table(s).

1. On the database side there are performance penalties incurred for not
being more specific in queries as the DBMS must manage each facet of the
table. May not be noticeable on big, high-powered servers until the
connections start to climb the ladder.

2. On the PHP side it makes code much cleaner and easier to document.

HTH!

Jay

***********************************************************
* Texas PHP Developers Conf  Spring 2003                  *
* T Bar M Resort & Conference Center                      *
* New Braunfels, Texas                                    *
* San Antonio Area PHP Developers Group                   *
* Interested? Contact [EMAIL PROTECTED] *
***********************************************************



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to