Bit of Problem With A mysql Query

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Little Spy
Forum Commoner
Posts: 31
Joined: Thu Oct 10, 2002 8:18 pm
Contact:

Bit of Problem With A mysql Query

Post 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
Little Spy
Forum Commoner
Posts: 31
Joined: Thu Oct 10, 2002 8:18 pm
Contact:

Post by Little Spy »

problem fixed no need for a reply
Post Reply