Jump to content

PHP Best mysql_type?


Mountain Water

Recommended Posts

  $sql = "SELECT pm FROM users WHERE id = '{$_SESSION['user_id']}'
		"; 
$result = mysql_query($sql) or die (mysql_error()); 
$num = mysql_num_rows($result);

 

$num['pm'] is data type ENUM('1','0')

 

Which mysql_fetch_____ is  the best option and best performance to just grab 1 or 0 from data

 

$num = mysql_num_rows($result);
if ($num['pm'] == "1") {
showpm();
}else {
echo "";
}

Link to comment
https://forums.phpfreaks.com/topic/186659-php-best-mysql_type/
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.