Jump to content

mysql help


scarface83

Recommended Posts

//database connection here
$query = mysql_query("SELECT count(*) as id from table where something = '$whatever'") or die(mysql_error()); 
$row = mysql_fetch_array( $query );
$exists = $row["id"];
if($exists == "" OR $exists == "0") { echo "not found"; }
else { return exists; }

hope that helps

Link to comment
https://forums.phpfreaks.com/topic/44328-mysql-help/#findComment-215275
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.