MySQL Forums
Forum List  »  PHP

Re: How do I pull out data from a mySQL DB...
Posted by: Peter Brawley
Date: April 28, 2006 09:36AM

Lots of ways, here's one. If table tbl has a date column named d, then

$res = mysql_query( "SELECT YEAR(d),MONTH(d),DAYOFMNONTH(d) FROM tbl WHERE id=123" );
$row = mysql_fetch_array( $res );
$url = sprintf( "http://xxx.xxx.xxx/balance.php?r=%s&p=%s&a=%s";, $row[0], $row[1], $row[2] );

PB

Options: ReplyQuote


Subject
Written By
Posted
Re: How do I pull out data from a mySQL DB...
April 28, 2006 09:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.