14.09.2010, 09:29
guys - even faster:
ps. high_priority can increase accuracy of count on very busy mysql servers. otherwise you probably wont need it
Код:
SELECT HIGH_PRIORITY COUNT(`idbusiness`) FROM `business` WHERE x=? AND y=?
Код:
if (!bcCount) { //row doesnt exist with x=? and y=? //insert row }