25.11.2011, 23:01
Having had several tables of data players can add new recordu automatically to all tables?
A different, better way is?
Quote:
new str[126]; format(str, sizeof(str), "SELECT `won` FROM `players_stats` WHERE `name` = '%s'", NickName(playerid)); mysql_query(str); mysql_store_result(); if(mysql_num_rows()) { mysql_free_result(); } else { mysql_free_result(); format(str, sizeof(str), "UPDATE `players_stats` SET `won`=%d WHERE `name` = '%s'", NickName(playerid)); mysql_query(str); } |