Re: php- something that i don't understand
| From: | Sheridan Saint-Michel | Date: | Tue, 17 Jul 2001 19:56:55 +0000 |
| Subject: | Re: php- something that i don't understand | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-58326@lists.php.net to get a copy of this message | ||
If you call it with no parameters it just uses the defaults...
host:port = 'localhost:3306'
username = name of the user that owns the server process
password = empty password
Check out
http://www.php.net/manual/en/function.mysql-connect.php
Sheridan
----- Original Message -----
From: Sam Masiello <smasiello@synacor.com>
To: Yassel Omar Izquierdo Souchay <yois@sics.transnet.cu>;
<php-general@lists.php.net>
Sent: Tuesday, July 17, 2001 2:42 PM
Subject: RE: [PHP] php- something that i don't understand
>
> Pardon my ignorance if you can really do it this way (because I have never
> seen it done like this):
>
> In line 4, I wasn't aware that you could call mysql_connect() without any
> parameters. Can you?
>
> HTH
>
> Sam Masiello
> Software Quality Assurance Engineer
> Synacor
> (716) 853-1362 x289
> smasiello@synacor.com
>
> -----Original Message-----
> From: Yassel Omar Izquierdo Souchay [mailto:yois@sics.transnet.cu]
> Sent: Tuesday, July 17, 2001 4:38 PM
> To: php-general@lists.php.net
> Subject: [PHP] php- something that i don't understand
>
> Hey guys
> here is my code
>
> 4: mysql_connect() or die ("Problemas conectandose a la base de datos");
> 5: $query="select * from info where FirstName='$FirstName' and
> 6: LastName='$LastName' and email='$email'";
> 7: $result = mysql_db_query("users", $query);
> *8: $r=mysql_fetch_array($result); ************
> 9: $count=$r["count"];
>
> and i follow redcieving this message
>
> Warning: Supplied argument is not a valid MySQL result resource in
> c:\inetpub\wwwroot\PhpAndMysqlTest\test2\reg1.php3 on line 8
>
>
> thanks for your answers
> Yassel
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net