Hi,
is there a function called mysql? You'll have to
use mysql_query. The syntax isn't correct either.
mysql_query("SELECT * FROM table" [, link identifier]);
Look in the manual for more detailed information.
hope it helps
Johannes
""martin helie"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9crr9l$4c4$[EMAIL PROTECTED]">news:9crr9l$4c4$[EMAIL PROTECTED]...
> Hello everyone, I hope this hasn't been discussed before (I've looked but
> haven't found any answers).
> This seems very, very strange, and maybe it's just me but here goes:
>
> PHP 4.0.4
> mySQL 3.23.30(gamma)
>
> 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'");
>
> but this works:
>
> mysql("database","SELECT * FROM table WHERE id='1234'");
>
> Uh? I've tried setting the type of the variable to string, to no avail.
> I've also tried things like "WHERE id LIKE '%$var%'"...
>
> Help?!
>
> Martin
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]