Posted 09 September 2003 - 01:09 AM
I want to update just a selection of rows based on some information given to the query.
My update statement reads as follows....
UPDATE table SET fieldx = fieldx+1 WHERE fieldx = \'$value\' ORDER BY fielda DESC LIMIT 4;
now this is done in a php script that generates $value from another query to the same table before this update query is attempted!
that query is as follows..
SELECT * FROM table WHERE filedy = \'$val\' ORDER BY fielda DESC;
and $val is user defined an not null!
I am using php 4.0 (on the server I use but I have no admin priviledges!)
is there something I\'m missing with the LIMIT statement?
Posted 09 September 2003 - 01:36 AM
Posted 09 September 2003 - 01:20 PM
The table is Called Uses! When I try to run the command on myphpadmin (v2.5.....) an erro is returned saying I have a syntax error in \'ORDER BY fileda DESC LIMIT 10\'
Posted 09 September 2003 - 01:37 PM
Posted 09 September 2003 - 05:04 PM
Other than that, there are no syntax errors in your query.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users