check record

June 4, 2011June 4, 2011 on MySQL tagged check record, check record in database

Check if a record exist in a specific table of database in MySQL

You can check if a record exist in a specific table of database in MySQL with the code block below: if(mysql_num_rows(mysql_query(“SELECT * FROM reports WHERE reportID = ‘$reportNUM'”))){ // Code inside if block if reportID is already there }

Newsletter

↑
  • Home
  • About Me
  • Contact Me