SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' DESC limit 0, 5' at line 1 Raw SQL : SELECT a.A_countrycode, a.A_id, a.A_country FROM AOG_members a INNER JOIN AOG_online b ON a.A_id = b.A_mid ORDER BY b.A_time DESC limit 0, 5
pls help me fix sql error
Started on the old forum in March 2014 · view the original in the archive · old links redirect here
There a space or can be wrong value ..
try to cut the space like limit 0,5 ( example )
Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!
SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…
Thank it is fixed but i have another error again!
Time : 08:52:05
SQLSTATE[HY093]: Invalid parameter number
Raw SQL : SELECT COUNT(*) FROM `AOG_friends` WHERE ((`A_mid` = :id AND `A_to` = :to) OR (`A_mid` = :to AND `A_to` = :id)) AND `A_accepted` = 'yes'
Added after 3 minutes:
Real codes/script part
$AOG_re = $this->AOG_db->AOG_single("SELECT COUNT(*) FROM `AOG_friends` WHERE ((`A_mid` = :id AND `A_to` = :to) OR (`A_mid` = :to AND `A_to` = :id)) AND `A_accepted` = 'yes'", array('id'=>"$AOG_mid", 'to'=>"$AOG_to"));
at a guess (without seeing what is defined in rest of script)
$AOG_re = $this->AOG_db->AOG_single("SELECT COUNT(*) FROM `AOG_friends` WHERE ((`A_mid` == $AOG_mid AND `A_to` == $AOG_to) OR (`A_mid` == $AOG_to AND `A_to` == $AOG_mid)) AND `A_accepted` == 'yes'");