Re: Going bonkers again ...
| From: | olinux | Date: | Fri, 23 Mar 2001 23:02:36 +0000 |
| Subject: | Re: Going bonkers again ... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7728@lists.php.net to get a copy of this message | ||
You have to escape your ""
> $query = "SELECT m_sender, m_date, m_subject FROM messages WHERE m_id =
> '$m_id'";
try this
$query = "SELECT m_sender, m_date, m_subject FROM messages WHERE m_id =
\"$m_id\"
";
----- Original Message -----
From: "Martin Skjöldebrand" <chimbis@skjoldebrand.org>
To: <php-db@lists.php.net>
Sent: Friday, March 23, 2001 11:15 AM
Subject: [PHP-DB] Going bonkers again ...
> Going bonkers again ...
> I have this in a script.
>
> <?php file://view jobs script
> include("../includes/connect.inc.php"); file://connect to the
database
> $query = "SELECT m_sender, m_date, m_subject FROM messages WHERE m_id =
> '$m_id'";
> $result = mysql_query($query , $mysql_link);
> $summary = mysql_fetch_row($result);
> $m_sender = $summary[0];
> $m_date = $summary[1];
> $m_subject = $summary[2];
> ?>
>
> Where m_id is passed to the page and connect.inc.php is my database
> connection script which works nicely with all other pages. Still I get:
>
> Warning: Supplied argument is not a valid MySQL-Link resource in
> /chroot/htdocs/helpdesk/scripts/viewmessage.scp.php on line 7
>
> Warning: Supplied argument is not a valid MySQL result resource in
> /chroot/htdocs/helpdesk/scripts/viewmessage.scp.php on line 8
>
> When running this in Mozilla.
> What can produce this and how do I track the error?
>
> M.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com