PHP MySQL_Result help

Status
Not open for further replies.

JoshuaLuke

Posting Freak
Jan 29, 2012
529
51
Heeey,

I'm making a UberCMS lottery and i'm using a $check variable to see if a user has already entered, this is my check param:
Code:
 $check = (mysql_result(mysql_query("SELECT `username` FROM `lottery` WHERE `username` = '" . USER_NAME . "'"), 0));
it works fine when a user has their name in the database but when it has no records in, the page says:
Code:
 Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 40 inC:\xampp\htdocs\includes\tpl\lottery.tpl on line 11
 
Status
Not open for further replies.

Users who are viewing this thread

Top