Re: Why this doesn't work ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Sorry, i do have the table name.
It just passed me while transcripting.

The code is:

---
$query = "SELECT COUNT (login) FROM formacao WHERE login = '$login'";
$result = mysql_query($query);
mysql_fetch_row($result);
---

It works perfectly on MySQL prompt.

Regards,
Mário Gamito

Colin Shreffler wrote:
It looks to me like you forgot to specify the table in your query:

SELECT COUNT (login) FROM <TABLENAME GOES HERE> WHERE login = '$login'


Hi,

Why this doesn't work ?

---
$query = "SELECT COUNT (login) FROM WHERE login = '$login'";
$result = mysql_query($query);
mysql_fetch_row($result);
---

It gives me
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in /var/www/html/registar_action.php on line 22

Any help would be apreciated.

Warm Regards,
Mário Gamito

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






Thank you,
Colin Shreffler
Principal
303.349.9010 - cell
928.396.1099 - fax
colin.shreffler@xxxxxxxxxxxxxxxxx

Warp 9 Software, LLC.
6791 Halifax Avenue
Castle Rock, CO 80104

Confidentiality Notice: The information in this e-mail may be confidential
and/or privileged. This e-mail is intended to be reviewed by only the
individual or organization named in the e-mail address. If you are not the
intended recipient, you are hereby notified that any review, dissemination
or copying of this e-mail and attachments, if any, or the information
contained herein, is strictly prohibited.


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux