In message <[EMAIL PROTECTED]>,
yanie sabariana <[EMAIL PROTECTED]> writes
>Hi guys,
> I have problem to connect from php to mysql, i'm using php 5.1.5 with apache
>server 2.0.54 and mysql ver 4
> this is my sintaks :
> <?
> //connect to database
> //("localhost", "root", "<password>")
> $connect = mysql_connect("localhost","root","");
> mysql_select_db("test");
> $query="SELECT * FROM table1";
> $result=mysql_query($query);
> $num=mysql_num_rows($result);
> echo $num;
> ?>
> and i found the error message :
> Fatal error: Call to undefined function mysql_connect() in C:\Program
>Files\Apache Group\Apache2\htdocs\connect.php on line 4
http://dev.mysql.com/doc/refman/5.0/en/mysql-connect.html
"This function is deprecated. It is preferable to use
mysql_real_connect() instead."
--
Pete Clark
Sunny Andalucia
http://www.hotcosta.com/comm_1.htm
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/php_mysql/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/