You are here: Re: [PHP] Why this doesn't work ? « PHP « IT news, forums, messages
Re: [PHP] Why this doesn't work ?

Posted by Mαrio Gamito on 10/24/05 20:34

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@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.
>

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация