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. Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.