(i use php and mysql on os windows)
i want to use statment in mysql like statement select top in sql server
for show only 1 record with specific condition
i use under statment as follow
Expand|Select|Wrap|Line Numbers
- $sql_show_news="select id,title_news,date_arrival_news from table_news LIMIT 1 where confirm=1
- and date_show<=NOW() and NOW()<=expire_date_show order by id DESC";
- $res_show_news=mysql_query($sql_show_news,$cxn1) or die('could not execute query sql_show_news');
in show i see the 'could not execute query sql_show_news'
that show that query could not execute
please help me
thanks