Re: mysql question #2

From: Date: Thu, 14 Feb 2008 20:44:49 +0000
Subject: Re: mysql question #2
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269321@lists.php.net to get a copy of this message
On Sun, February 10, 2008 12:12 pm, nihilism machine wrote: > public function select_one($sql) { > if ($this->auto_slashes) { > return stripslashes($ret); If you have to call stripslashes() on data coming FROM MySQL, then you have really messed up... You've put in data that was escaped TWICE, probably with Magic Quotes "ON" followed by addslashes (or mysql_real_escape_string). At any rate, just seeing this tells me that you've got a real mess on your hands... > } else { > return $ret; > } > } > > how can i get the contents of a column in the returned row say for > something called "Email" as the column name. here is my code now: Since it's only returning ONE piece of data, how confused can it be? $this->whatever['Email'] = $result; -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?

« previous php.general (#269321) next »