Re: query problem.
| From: | Brian V Bonini | Date: | Wed, 25 Jan 2006 00:06:24 +0000 |
| Subject: | Re: query problem. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229194@lists.php.net to get a copy of this message | ||
On Wed, 2006-01-25 at 08:01, Angelo Zanetti wrote:
> Hi guys.
>
> I got an entry in a field called emailfrom in my table (MySQL db).
>
> The data in that field is: Sams Bank <sam@domain.com>
>
> I then do the following to retrieve the info, using a DB class
>
> $recordset=$conn->Execute("SELECT * FROM wiml_history WHERE id = $task_id");
> $row=$recordset->GetArray();
>
> $emailfrom=$row[0]['emailfrom'];
>
> then I echo what I get out and I just get Sams Bank
>
> It doesnt bring back the whole entry in that field,
> however when I manually change the info in the field in the DB to:
>
> Sams Bank sam@domain.com, it retrieves it correctly.
>
> Why does the < > cause that not to be displayed? or is it retrieving it
> correctly but not showing it because of the < > (which might be
> conflicting with HTML tags?
>
> thanks in advance
$emailfrom = htmlspecialchars($row[0]['emailfrom']);
--
s/:-[(/]/:-)/g
Brian GnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
======================================================================
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org