monkeybidz Posted March 13, 2006 Share Posted March 13, 2006 Hello, all. Im new to this forum, and im stuck. Maybe someone here can help.First of all, let me explain what i am trying to do.I am try to have query result items starting by certian month. The current query i am using calls all months. Here is the current query(sloppy):[b][code]$query = "select a.id, a.title, u.nick, a.auction_type, a.buy_now, a.relist, a.starts, a.closed from PHPAUCTION_auctions a, PHPAUCTION_users u, PHPAUCTION_durations d where u.id=a.user and u.id='$id' and u.nick=u.nick and a.buy_now=a.buy_now and a.relist=a.relist and a.closed=a.closed and a.id=a.id and a.auction_type=a.auction_type order by a.starts ASC limit $offset, $limit";[/code][/b]a.starts table setting = varchar(14) default NULL[b][code]$ID = mysql_result($result,$i,"id");$title = stripslashes(mysql_result($result,$i,"title"));$auction_type = mysql_result($result,$i,"a.auction_type");$tmp_date = mysql_result($result,$i,"starts");$duration = mysql_result($result,$i,"duration");$auction_id = mysql_result($result,$i,"a.id");$month = substr($tmp_date,4,2);$day = substr($tmp_date,6,2);$year = substr($tmp_date,0,4);$date = "$month/$day/$year";$buy_now = mysql_result($result,$i,"a.buy_now");$closed = mysql_result($result,$i,"a.closed");$relist = mysql_result($result,$i,"a.relist");$nick = mysql_result($result,$i,"nick");[/code][/b]This month should be Januarythanks in advance! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.