<?php
include("db.php"); // has all the connection details in it
$sql = "SELECT * FROM `scschedule` WHERE 1";
$cycle = mysql_query($sql) or die (mysql_error());
while($row = mysql_fetch_row($cycle)) {
$cycle = $row[1];
}
echo "$cycle";
?>
I'm getting the following output.
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in <server/filename> on line number
april2004
So april2004 is the correcte value for $cycle, it's echoing it fine, but why am I getting the error? I can't turn the error reporting off as it's not my own server.
The table only has one row in it, with a series of dates. Any ideas welcome.