Bit of Problem With A mysql Query
Posted: Mon Dec 02, 2002 8:24 pm
I have a code bit that looks like this
and the functions query and queryReg look like this
no for some strange reason it wont let me get the user's email address from the database on the 2nd line, if anyone has an ideas to this strange problem please dont be afraid to share with me
Code: Select all
$date = time();
$rows = $DB_site->query("SELECT * FROM user WHERE username = '$ib_username'");
$rowsї'email'] = $na_email;
$DB_site->queryReg("INSERT INTO news (poster, date, email, newstxt, comnum, comallow)
VALUES ('$ib_username', '$date', '$na_email', '$na_newstxt', '0', '$na_comments')");Code: Select all
function queryReg($query_string) {
$query = mysql_query($query_string) or die($this->error("Invalid Syntax: " . $query_string));
}
function query($query_string) {
$query = mysql_query($query_string) or die($this->error("Invalid Syntax: " . $query_string));
$data = mysql_fetch_array($query);
return $data;
}