Re: Why this doesn't work ?
| From: | Mário Gamito | Date: | Mon, 24 Oct 2005 17:34:54 +0000 |
| Subject: | Re: Why this doesn't work ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224562@lists.php.net to get a copy of this message | ||
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.phpThank you, Colin Shreffler Principal 303.349.9010 - cell 928.396.1099 - fax colin.shreffler@warp9software.com 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.