PDA

View Full Version : update sites mysql warning


cjones
12-12-2004, 06:11 AM
has the phpdig_in_domain been removed in version 1.8.5?

EDIT: i thought i should do this here instead of creating a new thread

i clicked update sites and i got
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/cjones/public_html/phpdig/admin/limit_upd.php on line 227

is this a bug in 1.8.5?

Charter
12-12-2004, 11:19 AM
In limit_upd.upd find:

while (list($id,$url,$days_db,$links,$depth,) = mysql_fetch_row($result_id)) {

And replace with:

while (list($id,$url,$days_db,$links,$depth) = mysql_fetch_row($result_id)) {

Note the removal of the straggling comma after the $depth variable.

cjones
12-14-2004, 01:05 AM
i edited the code but i still got the error.
still on line 227

Charter
12-14-2004, 10:10 AM
In limit_upd.php find:

$result_id = mysql_query($query,$id_connect);

And afterwards add:

if (!$result_id) {
echo "The error is: ".mysql_error();
}

What does it print onscreen?

cjones
12-14-2004, 05:59 PM
ok, i'll try it now

cjones
12-14-2004, 06:08 PM
heres the result:
The error is: Unknown column 'P.days' in 'field list'
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/cjones/public_html/phpdig/admin/limit_upd.php on line 230


does this mean theres any error in one of my tables?

Charter
12-14-2004, 08:15 PM
The straggling comma was a bug/typo in the code. The "unknown column 'P.days' in 'field list'" means that you probably missed adding the days column to the site_page table when doing the upgrade:

ALTER TABLE site_page ADD COLUMN days INT(4) NOT NULL DEFAULT 0;

cjones
12-15-2004, 07:07 PM
sorry but im new, so what do i do with the code?

vinyl-junkie
12-15-2004, 09:05 PM
Go into phpMyAdmin on your web server, find the SQL command line dialog box, copy and paste that line of code into the dialog box and run it. That will get rid of your error.