[MySQL] How to stop creating more then 1 of the same row?
#10

guys - even faster:

Код:
SELECT HIGH_PRIORITY COUNT(`idbusiness`) FROM `business` WHERE x=? AND y=?
Код:
if (!bcCount) { 
//row doesnt exist with x=? and y=?
//insert row 

 }
ps. high_priority can increase accuracy of count on very busy mysql servers. otherwise you probably wont need it
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)