Re: [PHP-DB] More help with mysql -- solved (bizarre)

2003-02-27 Thread Alexander Mejenkov
It's not bizarre behaviour $result = mysql_query(SELECT * FROM SOME_TABLE) || die (Unable to execute SQL query); returns result of logical OR operation which is TRUE or 1 without || die(...) it returns valid MySQL resource Regards Sasha Evan Morris [EMAIL PROTECTED] wrote in message

Re: [PHP-DB] More help with mysql

2003-02-18 Thread Max 'AMiGo' Gashkov
Possible error in SQL statement. Are you sure that SOME_TABLE exists? EM Hi all EM I have successfully managed to connect to the mysql database, using the EM following code: EM mysql_connect('localhost','php','***') || die (Unable to connect to EM MySQL server.); EM $db =

Re: [PHP-DB] More help with mysql

2003-02-18 Thread Corne' Cornelius
Yo Evan, Have you got an '@' in front of the mysql_query() to supress errors ? Evan Morris wrote: Hi all I have successfully managed to connect to the mysql database, using the following code: mysql_connect('localhost','php','***') || die (Unable to connect to MySQL server.); $db =

Re: [PHP-DB] More help with mysql

2003-02-18 Thread Evan Morris
- Original Message - From: Max 'AMiGo' Gashkov [EMAIL PROTECTED] To: Evan Morris [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 10:13 AM Subject: Re: [PHP-DB] More help with mysql Possible error in SQL statement. Are you sure that SOME_TABLE exists? Yes. I

Re: [PHP-DB] More help with mysql

2003-02-18 Thread Evan Morris
Since I'm new to PHP, this concept is new to me. What does the @ do and where do you put it? - Original Message - From: Corne' Cornelius [EMAIL PROTECTED] To: Evan Morris [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 10:19 AM Subject: Re: [PHP-DB] More help

Re[2]: [PHP-DB] More help with mysql

2003-02-18 Thread Max 'AMiGo' Gashkov
Try listing of fields by name, not as '*', and put SOME_TABLE in qoutes ('). EM - Original Message - EM From: Max 'AMiGo' Gashkov [EMAIL PROTECTED] EM To: Evan Morris [EMAIL PROTECTED] EM Cc: [EMAIL PROTECTED] EM Sent: Tuesday, February 18, 2003 10:13 AM EM Subject: Re: [PHP-DB] More help

Re: [PHP-DB] More help with mysql -- solved (bizarre)

2003-02-18 Thread Evan Morris
If I remove the '|| die' part from the mysql_query() statement, it works fine. This is bizarre, but there it is. ie, if I have: $result = mysql_query(SELECT * FROM SOME_TABLE); it works. If I have: $result = mysql_query(SELECT * FROM SOME_TABLE) || die (Unable to execute SQL query); it

Re[2]: [PHP-DB] More help with mysql -- solved (bizarre)

2003-02-18 Thread Max 'AMiGo' Gashkov
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)) {

RE: Re[2]: [PHP-DB] More help with mysql -- solved (bizarre)

2003-02-18 Thread Clarkson, Nick
] Subject: Re[2]: [PHP-DB] More help with mysql -- solved (bizarre) 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

RE: [PHP-DB] More help with mysql -- solved (bizarre)

2003-02-18 Thread Ford, Mike [LSS]
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 08:26 If I remove the '|| die' part from the mysql_query() statement, it works fine. This is bizarre, but there it is. ie, if I have: $result = mysql_query(SELECT * FROM SOME_TABLE);

[PHP-DB] More help with mysql

2003-02-17 Thread Evan Morris
Hi all I have successfully managed to connect to the mysql database, using the following code: mysql_connect('localhost','php','***') || die (Unable to connect to MySQL server.); $db = mysql_select_db(DB_NAME) || die (Unable to select requested database.); I then issue the following