Jump to content

Selecting everything from 2007


jason97673

Recommended Posts

Hello, in PHP, I am creating a query trying to select * from the database where pub_date = year 2007

 

What would be the correct syntax for this MySQL statement?

 

I have something like that

 

SELECT *, substring( description, 1, 200 ) as short_description FROM books order by title ASC where pub_date = 2007/00/00

 

In the DB, the pub_date field is set to the date type.

 

But it doesn't work, query fails. Any help? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/60970-selecting-everything-from-2007/
Share on other sites

Archived

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

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