Page 1 of 1

Bit of Problem With A mysql Query

Posted: Mon Dec 02, 2002 8:24 pm
by Little Spy
I have a code bit that looks like this

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')");
and the functions query and queryReg look like this

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;
	}
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

Posted: Mon Dec 02, 2002 8:41 pm
by Little Spy
problem fixed no need for a reply