justjay
10-24-2003, 10:02 AM
OK thought I had a really great IDEA here to get the SERVER and MySQL to work for ME instead of the other way around so I tried this...
$query_Flights ="UPDATE Flights SET Valid = 'NO' WHERE UNIX_TIMESTAMP(DropDate) <= UNIX_TIMESTAMP();";
$query_Flights = "SELECT * FROM Flights ORDER BY Flights.Valid, Flights.Destination, Flights.DepartureDate, Flights.InputDate ASC";
$Flights = mysql_query($query_Flights, $connect) or die(mysql_error());
$row_Flights = mysql_fetch_assoc($Flights);
$totalRows_Flights = mysql_num_rows($Flights);
The important bit is in bold - I wanted to change that field automatically so that on the MASTER list it would fall under the NO section as you can see I am assembling the order by VALID first so we can see the ones that the CLIENTS are not seeing first - then we decide if we are dropping them or not (it may be that they need to be updated with new data)
However nothing changes when I call the page - I did try the Query in the MySQL box to ensure that my Syntax was correct and it worked!
IDEAS or suggestions?
$query_Flights ="UPDATE Flights SET Valid = 'NO' WHERE UNIX_TIMESTAMP(DropDate) <= UNIX_TIMESTAMP();";
$query_Flights = "SELECT * FROM Flights ORDER BY Flights.Valid, Flights.Destination, Flights.DepartureDate, Flights.InputDate ASC";
$Flights = mysql_query($query_Flights, $connect) or die(mysql_error());
$row_Flights = mysql_fetch_assoc($Flights);
$totalRows_Flights = mysql_num_rows($Flights);
The important bit is in bold - I wanted to change that field automatically so that on the MASTER list it would fall under the NO section as you can see I am assembling the order by VALID first so we can see the ones that the CLIENTS are not seeing first - then we decide if we are dropping them or not (it may be that they need to be updated with new data)
However nothing changes when I call the page - I did try the Query in the MySQL box to ensure that my Syntax was correct and it worked!
IDEAS or suggestions?