I'd like to try and see if I can find the problem as I write with PHP for
MySQL quite a bit.  However, without the specifics of how the script is
running as is, I can't tell where the problem is.  Write a quick script in
complete detail that does what your post is doing and I'll look for
anything.  Right now I have to assume certain steps are being made.  If they
are than I don't have a solution but I'd rather go with what you are
actually doing than go by my assumptions.  By all means hide the names of
the innocent and continue with a,b,c but just don't do "..."

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-----Original Message-----
From: Nuno Lopes [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 04, 2003 5:46 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: PHP and MySQL bug

Dear Sirs,

I'm using PHP and MySQL to make my programs. But I think I discovered a bug
in PHP or in MySQL (I don't know!).

In one of my files I have the following:

MYSQL_CONNECT("localhost", "**user**", "**pass**");
mysql_select_db("be");
$r=MYSQL_QUERY("SELECT n,u,m,h FROM d WHERE id='$id'");

/* Some code including "mysql_num_rows" and "mysql_fetch_array($r,
MYSQL_NUM)"
And the another query:
*/

MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");

/* i don't know why but this doesn't work! But if I close the connection and
open another te query is done:*/

MYSQL_CLOSE();
MYSQL_CONNECT("localhost", "**user**", "**pass**");
mysql_select_db("be");
MYSQL_QUERY("UPDATE d SET h='$h' WHERE id='$id'");

---------------
I don't know why is this? Because I'm used to do more than a query per
connection and this never happened!
I'm using Win 2k, Apache 2.0.43, MySQL 3.23.49-nt and PHP 4.3.


I hope you solve this,
Nuno Lopes



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to