Mountain Water Posted December 30, 2009 Share Posted December 30, 2009 $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 ""; } Quote Link to comment https://forums.phpfreaks.com/topic/186659-php-best-mysql_type/ Share on other sites More sharing options...
mikesta707 Posted December 30, 2009 Share Posted December 30, 2009 they are all they same I believe, they just change which format the data is saved in (an object, associative array, numeric array, etc.) Quote Link to comment https://forums.phpfreaks.com/topic/186659-php-best-mysql_type/#findComment-985815 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.