MSSQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dejvos
Forum Contributor
Posts: 122
Joined: Tue Mar 10, 2009 8:40 am

MSSQL

Post by dejvos »

Hello,

can someone tell me equivalent code for MSSQL:

Code: Select all

 
$query = "SELECT * FROM table WHERE mydatetime > '".date('Y-m-d H:i:s')."'";
 
Many thanks!
dejvos
Forum Contributor
Posts: 122
Joined: Tue Mar 10, 2009 8:40 am

Re: MSSQL

Post by dejvos »

Ok,

I solved it:

Code: Select all

 
$query = " SELECT * FROM table WHERE date = CONVERT(datetime,".date('Y-m-d').")";
 
Post Reply