if mysql_result mysql_query SELECT COUNT FROM kolhoz_collections WHERE

1
2
3
4
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collections` WHERE `id_user` = '$ku[id]'"),0)==0)
{
mysql_query("INSERT INTO `kolhoz_collections` SET `id_user` = '$ku[id]'");
}