MySQL query

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
bouncer
Forum Contributor
Posts: 162
Joined: Wed Feb 28, 2007 10:31 am

MySQL query

Post by bouncer »

hi, can someone tell me whats wrong with this query ?

Code: Select all

"SELECT *,a.data AS data, a.activo AS activo, a.id AS id, b.codigo AS codigo, a.preco AS preco, a.id_cliente AS id_cliente, b.id AS cod_prod FROM antileilao a INNER JOIN produtos b ON a.id_produto = b.codigo WHERE a.mostra = 1 AND a.activo = 1 AND CURDATE() <= a.datafim ORDER BY a.data";
maybe something wrong in CURDATE(), dont have sure about that function in this query :wink:

thanks in advance
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Whats the problem/error?
bouncer
Forum Contributor
Posts: 162
Joined: Wed Feb 28, 2007 10:31 am

Post by bouncer »

i dont get any data using this query, if i remove "CURDATE()<=a.datafim", the query works :?

problem solved :D

thanks in advance
Post Reply