Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: problem regarding PHP 5.2.0+ Apache 2.2.4 +MySql4.1.19 |
|
Author |
|
jawaidpk
Joined: 06 Feb 2007 Posts: 1
|
Posted: Tue 06 Feb '07 17:12 Post subject: problem regarding PHP 5.2.0+ Apache 2.2.4 +MySql4.1.19 |
|
|
well I have just installed my PHP 5.2.0 but when I tried to execute
$dbh = mysql_connect("localhost","root","root") or die("could not open the database");
mysql_select_db("database",$dbh);
$res = mysql_query("SELECT * FROM table");
echo mysql_num_rows($res);
I saw nothing infact a blank page. so what might be the problem??
Remeber I have executed mysqlinfo.php & the output shows the successful connection to mysql something like this.....
User root connected to the MySQL server at localhost
Mysql version: 4.1.19-community-nt |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 06 Feb '07 17:31 Post subject: |
|
|
Enabled short tags in php.ini? |
|
Back to top |
|
useless81
Joined: 07 Feb 2007 Posts: 6
|
Posted: Fri 09 Feb '07 1:41 Post subject: |
|
|
mysql_select_db("database");
is all you need there, you can not pass the handle. (I dont anyway),
Try changing your query to SELECT * FROM table WHERE 1
Without the WHERE clause you are returning zero rows I believe. |
|
Back to top |
|
|
|
|
|
|