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

Ah okay. Thanks Calgon.

I'll edit, and post a Code i'll make rl fast.

EDIT:

pawn Код:
function CreateBusiness(Bizzname[], price, Float:EnterX, Float:EnterY, Float:EnterZ)
{
    format(str, sizeof(str), "SELECT * FROM `bizzinfo`");
    mysql_query(str);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    format(str, sizeof(str), "INSERT INTO `bizzinfo` (BizzName, Owner, Price, PayAmount, EntX, EntY, EntZ) VALUES ('%s', 'For Sale', %d, 5000, %f, %f, %f)", Bizzname, price, EnterX, EnterY, EnterZ);
    mysql_query(str);
    mysql_free_result();
    return 1;
}
This is all I had. This still lets me create more then 1 of the same business.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)