hey , I also got the same problem but in my case it was php4 and mysql5 and debian linux.
what I did is chk the phpinfo() page and the mysql support was not there so it means your mysql is not connected with the PHP so you have enable the things in the php.ini file. in my case I jsut uncommented the extension=mysql.so and restart the apache. and it's done. PHP5 by default not support the mysql connection. so you have to enable it. -- ankur dave. --- In [email protected], yanie sabariana <[EMAIL PROTECTED]> wrote: > > 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 > > > > --------------------------------- > Apakah Anda Yahoo!? > Kunjungi halaman depan Yahoo! Indonesia yang baru! > > [Non-text portions of this message have been removed] > 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/
