[Wylug-help] PHP / MySQL development question
James Holden
wylug at jamesholden.net
Fri Oct 12 12:42:40 BST 2007
On Fri, Oct 12, 2007 at 12:20:17PM +0100, Roger Beaumont wrote:
> Hi y'all,
>
> I picked up Lee Evans appeal for assistance and so far, so good, but I've
> just picked up a usage in the code that I've never seen before:
> ------------------------------------------------
> /* update log */
> $log_q_str = "INSERT INTO log (blah) VALUES ('blah')"; // edited !!
okay...
> $event = mysql_query($log_q_str);
okay...
> mysql_query($event);
...gibberish
james
> ------------------------------------------------
> According to the docs, mysql_query() returns a resource for SEARCH and such
> queries that retrieve rows from a table, but for others (which I believe
> includes INSERT) it returns a boolean, which would mean the second
> mysql_query() is nonsense (but presumably error messages are ignored).
Something like that.
> Am I right (which would explain why I've not seen this construct before) or
> does it do something I'm not understanding?
Yes - there will be something in the error log (presumably lots of
times) warning of nonsense passed to mysql_query().
james
>
> TIA,
>
> Roger
>
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/wylug-help
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://list.wylug.org.uk/pipermail/wylug-help/attachments/20071012/28116319/attachment.bin
More information about the Wylug-help
mailing list