techker Posted October 27, 2008 Share Posted October 27, 2008 hey guys i found this with google.works fine in my phpmyadmin $sql = 'EXPLAIN SELECT CURRENT_DATE FROM `members` WHERE `date_rendezvous`'; but when i put it in my page it does not echo anything? <? echo $info['date_rendezvous'] ?> Link to comment https://forums.phpfreaks.com/topic/130297-select-current-date/ Share on other sites More sharing options...
Maq Posted October 27, 2008 Share Posted October 27, 2008 Don't know how, this query isn't right... $sql = 'EXPLAIN SELECT CURRENT_DATE FROM `members` WHERE `date_rendezvous`'; The WHERE clause needs something to compare to. Anyway, if it works in PhpMyAdmin then I guess it should work in your code. We need to see the whole query part of your code. Link to comment https://forums.phpfreaks.com/topic/130297-select-current-date/#findComment-675735 Share on other sites More sharing options...
techker Posted October 27, 2008 Author Share Posted October 27, 2008 $delRT = "SELECT CURRENT_DATE FROM `members` WHERE `date_rendezvous` LIMIT 0 , 30 "; $fileLIST=mysql_query($delRT); <?php while ($info=mysql_fetch_array($fileLIST)) {?> <? echo $info['date_rendezvous'] ?></td> <? } ?> Link to comment https://forums.phpfreaks.com/topic/130297-select-current-date/#findComment-675746 Share on other sites More sharing options...
Maq Posted October 27, 2008 Share Posted October 27, 2008 You should be getting an error, please change this line to view the error: $fileLIST=mysql_query($delRT) or die(mysql_error()); You have WHERE `date_rendezvous` with no comparison, I don't even understand how this works. Please re-run the script with the debugging code and tell me what it says. Link to comment https://forums.phpfreaks.com/topic/130297-select-current-date/#findComment-675866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.