Page 1 of 1

Warning: mysql_query(): supplied argument..( Problem Solved)

Posted: Thu Aug 07, 2003 3:57 pm
by Critter183
Just in case I can't solve problem with other classified script I have installed, I am tryin this one, and have run into another brick wall. hehehe

The following are errors I received thus far:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/virtual/site88/fst/var/www/html/mcpages/ads/lib/func_common.php on line 154


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtual/site88/fst/var/www/html/mcpages/ads/lib/func_common.php on line 167
The first line in the following is line 154 and the last line is line 167.
$result = mysql_query($query, $myDB);


if ($centered_or_not)
{ echo '<CENTER>' ;
}

echo '<table width="'.$table_width.'" cellpadding="'.$table_pad.'" cellspacing="'.$table_spc.'">';

$countCols = 1;
$num_cols = $num_cols+($num_cols-1);


for ($i=0; $i<mysql_num_rows($result); $i++ )
Can anyone decipher this error for me?

Thanks in advance,

Jim

Problem Solved

Posted: Thu Aug 07, 2003 4:25 pm
by Critter183
I made a boo boo in the config_vars.php file.

I entered my db info like this:

$cnfg['localhost'] = "";
$cnfg['mydomain'] = "";
$cnfg['mypassword'] = "";
$cnfg['mydomain_com'] = "";
instead of like this:
$cnfg['dbHost'] = "localhost";
$cnfg['dbUser'] = "mydomain";
$cnfg['dbPass'] = "mypassword";
$cnfg['dbName'] = "mydomain_com";
Well, at least I am learning something, after all. hehehe

Thanks for readin this anyway.