0

Hi all, ive got a big question about conducting mysql_queries.. i have a schedule program that needs to sort through and pick the records that apply.. the date will change, and used a php date() formatted to mysql date and pick out the ones records that are active vers inactive. and finally sort through the other fields..

$sql="SELECT * FROM $dbtable WHERE date = $sysdate AND recstatus='active' ORDER BY ftime ASC, stime ASC, tailnum ASC";

can anyone tell me if im on the right track or am i going the wrong direction? THX to anyone that can help!!

2
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by duneflyingyfz_1
0

in php config file:

$sysdate=date('Y/m/d');

in the table

recstatus varchar(50) < to determine if i should show the record Actice(yes) or skip it inactive(no)
date = date < used to hold the date format YYYY/MM/DD
ftime = time < used for start time format HH:MM:SS
stime = time < used for end time format HH:MM:SS

im trying to compare what the record has against what i want to show in realtime date and sort by ftime and stime

0

also for current date, trying to keep it configured using:

date_default_timezone_set("America/Phoenix");

due to server being on east coast time. thought would be easier for me then using mysql function

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.