ïÛÉÂËÃ
am 15.02.2004 22:38:09 von aleha
------=_NextPart_000_0005_01C3F41C.C48A1070
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
=F1 ÉÓÐÏÌØÚÕ=C0 Windows2000 Professional.
îÅÄÁ×Î=CF, =D1 ÕÓÔÁÎÏ×É=CC =D5 ÓÅÂÑ =
MySQL4.0, ÄÏ ÜÔÏÇ=CF =D5 ÍÅÎÑ ÂÙ=CC MySQL3.53. =
=F1 ÕÓÔÁÎÁ×ÌÉ×ÁÌ MySQL4.0 ÉÚ =
mysql-4.0.18-win.zip, ËÏÔÏÒÙ=CA ÚÁÇÒÕÚÉÌ =D3 =
mysql.com.=20
ïÛÉÂËÁ ÚÁËÌÀÞÁÅÔÓ=D1 =D7 =
ÓÌÅÄÕÀÝÅ=CD.
ëÏÇÄ=C1 =D1 ÐÉÛÕ =D7 php-ÆÁÊÌ=C5 (PHP4)
$row=3Dmysql_fetch_row($query_select_needful_users_info);
if(!$row)
{
echo "Error!";
echo mysql_error();
exit;
}
ÓËÒÉÐÔ ×Ù×ÏÄÉ=D4 ÎÁ ÜËÒÁ=CE "Error!" =
=C9 ÐÒÅËÒÁÝÁÅÔ Ó×ÏÅ =
ÄÅÊÓÔ×ÉÅ. óÔÒÏËÁ "echo mysql_error();" - =
ÉÇÎÏÒÉÒÕÅÔÓÑ.=20
Why??????
------=_NextPart_000_0005_01C3F41C.C48A1070--
Re: ïÛÉÂËÃ
am 16.02.2004 00:12:07 von Sanja Byelkin
Hi, Aleksej!
On Sun, Feb 15, 2004 at 11:38:09PM +0200, ÏÔ íÙÓÁËÁ áÌÅËÓÅÑ wrote:
> ñ ÉÓÐÏÌØÚÕÀ Windows2000 Professional.
> îÅÄÁ×ÎÏ, Ñ ÕÓÔÁÎÏ×ÉÌ Õ ÓÅÂÑ MySQL4.0, ÄÏ ÜÔÏÇÏ Õ ÍÅÎÑ ÂÙÌ MySQL3.53. ñ ÕÓÔÁÎÁ×ÌÉ×ÁÌ MySQL4.0 ÉÚ mysql-4.0.18-win.zip, ËÏÔÏÒÙÊ ÚÁÇÒÕÚÉÌ Ó mysql.com.
> ïÛÉÂËÁ ÚÁËÌÀÞÁÅÔÓÑ × ÓÌÅÄÕÀÝÅÍ.
> ëÏÇÄÁ Ñ ÐÉÛÕ × php-ÆÁÊÌÅ (PHP4)
>
> $row=mysql_fetch_row($query_select_needful_users_info);
> if(!$row)
> {
> echo "Error!";
> echo mysql_error();
> exit;
> }
>
> ÓËÒÉÐÔ ×Ù×ÏÄÉÔ ÎÁ ÜËÒÁÎ "Error!" É ÐÒÅËÒÁÝÁÅÔ Ó×ÏÅ ÄÅÊÓÔ×ÉÅ. óÔÒÏËÁ "echo mysql_error();" - ÉÇÎÏÒÉÒÕÅÔÓÑ.
> Why??????
÷Ï ÐÅÒ×ÙÈ, ÐÉÓØÍÁ × ÜÔÏÔ ÓÐÉÓÏË ÒÁÓÓÙÌËÉ ÄÏÌÖÎÙ ÐÉÓÁÔÓÑ ÐÏ ÁÎÇÌÉÊÓËÉ.
÷Ï ×ÔÏÒÙÈ, ÐÒÏÂÌÅÍÁ (ÓÕÄÑ ÐÏ ÏÐÉÓÁÎÉÀ) ÏÔÎÉÓÉÔÓÑ ÂÏÌØÛÅ Ë php.
ñ ÐÅÒÅ×ÅÌ (ËÁË ÍÏÇ) ×ÁÛÅ ÐÉÓØÍÏ. íÏÖÅÔ ÎÁÊÄÕÔÓÑ ÌÀÄÉ ËÏÔÏÒÙÅ
ÂÏÌØÛÅ ÍÏÅÇÏ ÒÁÚÂÉÒÁÀÔÓÑ × php.
á ÜÔÏ ÐÅÒÅ×ÏÄ ÎÁ ÁÎÇÌÉÊÓËÉÊ (ÄÌÑ ÉÓÈÏÄÎÏÇÏ ÐÉÓØÍÁ - ÔÏÌØËÏ ÆÁËÔÙ):
here is English translation (only facts for original message):
> I use Windows2000 Professional.
> I have installed MySQL4.0.18 (mysql-4.0.18-win.zip from mysq.com), MySQL3.53
> was used before it.
> Following code return "Error!" and exit:
> $row=mysql_fetch_row($query_select_needful_users_info);
> if(!$row)
> {
> echo "Error!";
> echo mysql_error();
> exit;
> }
> Why 'echo mysql_error();' is ignored?
First of all, messages to this e-mail list should be written in English.
The problem look like php related.
I have translated your letter (as I can). It is possible that this letter
will be answered by some people who know php better then I.
--
Want to swim with the dolphins? (April 14-16, 2004)
http://www.mysql.com/uc2004/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Oleksandr Byelkin
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Lugansk, Ukraine
<___/ www.mysql.com
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
Re: ïÛÉÂËÃ
am 16.02.2004 00:29:15 von Paul Coldrey
Hi Aleksej,
mysql_error(...) will display error information from the last
mysql_query(...) call (if there was an error). mysql_fetch_row(...)
returns the current row in a result set. It can return no rows even when
the query was successful.
For example:
select * from table1 where 1=0
is a valid query that returns no rows.
some code that might work better for you is:
if(!($qry = mysql_query('select * from blah'))) {
echo mysql_error();
exit;
}
while($row = mysql_fetch_row($qry)) {
// do some stuff with $row
}
Cheers,
Paul
Sanja Byelkin wrote:
>Hi, Aleksej!
>
>On Sun, Feb 15, 2004 at 11:38:09PM +0200, ÏÔ íÙÓÁËÁ áÌÅËÓÅÑ wrote:
>
>
>>ñ ÉÓÐÏÌØÚÕÀ Windows2000 Professional.
>>îÅÄÁ×ÎÏ, Ñ ÕÓÔÁÎÏ×ÉÌ Õ ÓÅÂÑ MySQL4.0, ÄÏ ÜÔÏÇÏ Õ ÍÅÎÑ ÂÙÌ MySQL3.53. ñ ÕÓÔÁÎÁ×ÌÉ×ÁÌ MySQL4.0 ÉÚ mysql-4.0.18-win.zip, ËÏÔÏÒÙÊ ÚÁÇÒÕÚÉÌ Ó mysql.com.
>>ïÛÉÂËÁ ÚÁËÌÀÞÁÅÔÓÑ × ÓÌÅÄÕÀÝÅÍ.
>>ëÏÇÄÁ Ñ ÐÉÛÕ × php-ÆÁÊÌÅ (PHP4)
>>
>>$row=mysql_fetch_row($query_select_needful_users_info);
>>if(!$row)
>>{
>> echo "Error!";
>> echo mysql_error();
>> exit;
>>}
>>
>>ÓËÒÉÐÔ ×Ù×ÏÄÉÔ ÎÁ ÜËÒÁÎ "Error!" É ÐÒÅËÒÁÝÁÅÔ Ó×ÏÅ ÄÅÊÓÔ×ÉÅ. óÔÒÏËÁ "echo mysql_error();" - ÉÇÎÏÒÉÒÕÅÔÓÑ.
>>Why??????
>>
>>
>
>÷Ï ÐÅÒ×ÙÈ, ÐÉÓØÍÁ × ÜÔÏÔ ÓÐÉÓÏË ÒÁÓÓÙÌËÉ ÄÏÌÖÎÙ ÐÉÓÁÔÓÑ ÐÏ ÁÎÇÌÉÊÓËÉ.
>÷Ï ×ÔÏÒÙÈ, ÐÒÏÂÌÅÍÁ (ÓÕÄÑ ÐÏ ÏÐÉÓÁÎÉÀ) ÏÔÎÉÓÉÔÓÑ ÂÏÌØÛÅ Ë php.
>
>ñ ÐÅÒÅ×ÅÌ (ËÁË ÍÏÇ) ×ÁÛÅ ÐÉÓØÍÏ. íÏÖÅÔ ÎÁÊÄÕÔÓÑ ÌÀÄÉ ËÏÔÏÒÙÅ
>ÂÏÌØÛÅ ÍÏÅÇÏ ÒÁÚÂÉÒÁÀÔÓÑ × php.
>
>á ÜÔÏ ÐÅÒÅ×ÏÄ ÎÁ ÁÎÇÌÉÊÓËÉÊ (ÄÌÑ ÉÓÈÏÄÎÏÇÏ ÐÉÓØÍÁ - ÔÏÌØËÏ ÆÁËÔÙ):
>here is English translation (only facts for original message):
>
>
>
>>I use Windows2000 Professional.
>>I have installed MySQL4.0.18 (mysql-4.0.18-win.zip from mysq.com), MySQL3.53
>>was used before it.
>>Following code return "Error!" and exit:
>>$row=mysql_fetch_row($query_select_needful_users_info);
>>if(!$row)
>>{
>> echo "Error!";
>> echo mysql_error();
>> exit;
>>}
>>Why 'echo mysql_error();' is ignored?
>>
>>
>
>First of all, messages to this e-mail list should be written in English.
>The problem look like php related.
>
>I have translated your letter (as I can). It is possible that this letter
>will be answered by some people who know php better then I.
>
>
>
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
Re: ïÛÉÂËÃ
am 16.02.2004 14:11:46 von Alexander Keremidarski
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Paul,
Thanks for fast and precise reply.
Paul Coldrey wrote:
> Hi Aleksej,
>
> mysql_error(...) will display error information from the last
> mysql_query(...) call (if there was an error). mysql_fetch_row(...)
> returns the current row in a result set. It can return no rows even when
> the query was successful.
Best regards
- --
Meet the MySQL Team at User Conference 2004!
http://www.mysql.com/uc2004/
For technical support contracts, visit https://order.mysql.com/?ref=msal
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexander Keremidarski
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Sofia, Bulgaria
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAMMGReehWBZ4HcYkRAis9AJ9hYvged+PSyTtBUHz1g4+/sUdVcgCg sF0L
rzX331XxxqtUwp/3oNw69g0=
=un8a
-----END PGP SIGNATURE-----
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org