TheFilmGod Posted October 10, 2008 Share Posted October 10, 2008 <?php // Yeseterday $date = date("Y-m-d", strtotime("-1 days")); $result = $mysqli->query("SELECT stats_session WHERE date = $date"); $activity[1] = $result->num_rows; ?> when I echo $activity[1]; nothing happens. It should echo 117. Link to comment https://forums.phpfreaks.com/topic/127790-php-syntax-help-on-mysql-select-statement/ Share on other sites More sharing options...
genericnumber1 Posted October 10, 2008 Share Posted October 10, 2008 try adding or die(mysql_error()); to the end of your query. Link to comment https://forums.phpfreaks.com/topic/127790-php-syntax-help-on-mysql-select-statement/#findComment-661560 Share on other sites More sharing options...
Maq Posted October 10, 2008 Share Posted October 10, 2008 Echo $result->num_rows Link to comment https://forums.phpfreaks.com/topic/127790-php-syntax-help-on-mysql-select-statement/#findComment-661651 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.