Quote:
Originally Posted by Marco van Herwaarden
Try:
PHP Code:
$urls = mysql_query("SELECT linkid,linkurl FROM adv_links ORDER by linkid ASC WHERE dateline > " . (TIMENOW - (2 * 24 * 60 * 60)));
|
Thanks for the help but that bit of code gives me the error
Quote:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/pagevisD.php on line 19
|
on the line after the SQL query call. I edited the SQL cal that works and changed linkid,linkurl to linkid,linkurl,dateline - then added fwrite($file, $urlrow[2]); to the output file as a test (and the date shows up) so I know it's not the dateline table entry that is the problem.
Other thoughts?
--------------- Added [DATE]1210086427[/DATE] at [TIME]1210086427[/TIME] ---------------
Quote:
Originally Posted by Eikinskjaldi
More easily done within mysql
...where unix_timestamp() - timecolumn <= 3600*48
|
Sorry I missed this post, could you elaborate?
Thanks,
--------------- Added [DATE]1210108992[/DATE] at [TIME]1210108992[/TIME] ---------------
PHP Code:
$urls = mysql_query("SELECT linkid,linkurl FROM adv_links ORDER by linkid ASC WHERE unix_timestamp() - timecolumn <= 3600*48");
Eikinskjaldi, tried this as the query and I get the same PHP error as above -
Quote:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/pagevisD.php on line 19
|
I have tried several variations of both syntaxes above and the error persists. I'll keep trying...