php-db | 2001051
Date: 05/03/01
- Next message: Larry Rivera: "RE: [PHP-DB] interbase (?) field contents does not show"
- Previous message: CC Zona: "Re: [PHP-DB] Newbie question"
- In reply to: martin helie: "[PHP-DB] Mystery variable query?"
- Next in thread: martin helie: "Re: [PHP-DB] Mystery variable query?"
- Reply: martin helie: "Re: [PHP-DB] Mystery variable query?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <9crr9l$4c4$1 <email protected>>,
martinh <email protected> ("martin helie") wrote:
> assuming:
>
> $var="1234"; (type does not seem to matter)
>
> this query returns no error, but no result either:
>
> mysql("database","SELECT * FROM table WHERE id='$var'");
When you call mysql_query is it perhaps from inside a function, where
variable $var has not been passed or made global?
(BTW, whenever you experience problems with a query, it's a good idea to
echo the query string to the browser. Often, this simple step makes it
very clear where the problem lies. Using mysql_error() and $php_errormsg
on a query failure also can give you very useful information.)
-- CC-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Larry Rivera: "RE: [PHP-DB] interbase (?) field contents does not show"
- Previous message: CC Zona: "Re: [PHP-DB] Newbie question"
- In reply to: martin helie: "[PHP-DB] Mystery variable query?"
- Next in thread: martin helie: "Re: [PHP-DB] Mystery variable query?"
- Reply: martin helie: "Re: [PHP-DB] Mystery variable query?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

