OK, now I see 8)

$result  after  your operations contains not SQL result, it's value is 1 (logical
TRUE)  -- result of logical operation

mysql_query("SELECT * FROM SOME_TABLE") || die(....

If you want to exit after error try this construction:

if(!mysql_query("SELECT * FROM SOME_TABLE"))

EM> If I remove the '|| die' part from the mysql_query() statement, it works
EM> fine. This is bizarre, but there it is.

EM> ie, if I have:

EM> $result = mysql_query("SELECT * FROM SOME_TABLE");

EM> it works.

EM> If I have:

EM> $result = mysql_query("SELECT * FROM SOME_TABLE") || die ("Unable to execute
EM> SQL query");

EM> it doesn't work. It gives me: " Supplied argument is not a valid MySQL
EM> result resource"

EM> Anyway, since it works I don't suppose I should complain, but it seems
EM> pretty weird to me nevertheless.

WBR, Max 'AMiGo' Gashkov
[EMAIL PROTECTED] ]=[ http://diary.otaku.ru/amigo
Distributed.net participant [408228][RC5-72]

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to