This one is driving me nuts...seems simple! Can anyone provide insight...
Whenever I add the AND compound clause to my SQL statement I get the dreaded:
Warning: Supplied argument is not a valid MySQL result resource
However, if I remove the AND clause it works fine!!!
Here are the lines it is complaining about
$queryrow = mysql_query("SELECT * from log2 where ($weeknum = weeknum) AND ($goyear = year)");
///THE LINE BELOW HERE IS THE CULPRIT!!
$displayrows = mysql_num_rows($queryrow);
/===================================================/
/==Query and fetch array with the limit and offset==/
/===================================================/
$query = "SELECT *, DATE_FORMAT(rundate, '%W, %M %d, %Y') as fdate from log2 where ($weeknum = weeknum) AND ($goyear = year) order by rundate, dayofweek";
/==========================================/
/==Append the limit and offset to the sql==/
/==========================================/
$query.=" limit $thisOffset, $displayrows";
$result = mysql_query($query);
////THE LINE BELOW HERE IS THE CULPRIT!!!
while ($row = mysql_fetch_array($result))
Now like I said once I remove the AND clause and the additional criteria it works fine, but my data is not isolated enough.