Jump to content

Archived

This topic is now archived and is closed to further replies.

techker

select current date

Recommended Posts

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'] ?>

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
$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>
  <? } ?>

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

×
×
  • 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.