EDIT: Fixed this problem. Stay tuned for more. *sigh*
NOTE: Okay, I created a new thingamajig, now I need to: make a "fetch_array" function. I tried, using this code:
PHP Code:
function fetch_array($arrayx){
$array=mysql_fetch_array($arrayx,MYSQL_BOTH);
return $array;
}
Does that look right?
Then, I use this:
PHP Code:
$DB_SITE->select_db($usedb);
echo $usedb;
$data = $DB_SITE->("SELECT email FROM authors WHERE name='Gengar003'");
while ($row = mysql_fetch_array($data, MYSQL_ASSOC)) {
printf ("email: %s", $row["email"]);
}
NOTE: DB is connected to earlier in the script.
Then I run it, and get this error:
Quote:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'{'' or `'$'' in /home/gengar00/public_html/news/dbconnect.php on line 70
|
And before it started doing that, It gave me something like...
"Supplied argument is not a valid mysql result resource."
Lines 60-76:
PHP Code:
return $array;
}
//nofetch
}
/////////////////////////////////////////////////////////////////END DB CLASS
$DB_SITE->select_db($usedb);
echo $usedb;
$data = $DB_SITE->("SELECT email FROM authors WHERE name='Gengar003'");
while ($row = mysql_fetch_array($data, MYSQL_ASSOC)) {
printf ("email: %s", $row["email"]);
}
?>