MysqlI and php5 under IIS rows returned=0 ??? [-Solved-]
Posted: Mon Dec 26, 2005 11:39 pm
OK, here goes, i am an asp.net developer, trying to move over to non-os-proprietary scripting, databases, etc.
I currently have a HUGE website (group od sub-d's) under IIS, and i am TRYING to build a replica using the PHP-MySQL cofig, but i downloaded Mysql5 and PHP5, something i am finding out is not to good of an idea.
I have tried several examples of scripts for the mysqlI functions to no avail, i can CONNECT, but my queries return nothing. and yes, i AM connecting to a database that does have data (18,945 rows of it).
here's what i've got, and it does nothing:
at the moment i only have one pc, so i have to build this replica site under IIS, that way as soon as i get it working, i'll only have to take the site down for a short amount of time to switch it to apache, but right now, i HAVE to develop under iis so that the rest of my LIVE sites are running. but i don't think it has anyhting to do with iis at all because the script is working and interacting with the database, i just can't find the proper sytax or some crap.
I currently have a HUGE website (group od sub-d's) under IIS, and i am TRYING to build a replica using the PHP-MySQL cofig, but i downloaded Mysql5 and PHP5, something i am finding out is not to good of an idea.
I have tried several examples of scripts for the mysqlI functions to no avail, i can CONNECT, but my queries return nothing. and yes, i AM connecting to a database that does have data (18,945 rows of it).
here's what i've got, and it does nothing:
Code: Select all
<?php
$link = mysqli_connect("localhost", "root", "DEMIGOD", "alexgrim");
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
if ($result = mysqli_query($link, "SELECT uname FROM account_info ORDER BY Name")) {
$row_cnt = mysqli_num_rows($result);
printf("Result set has %d rows.\n", $row_cnt);
mysqli_free_result($result);
}
mysqli_close($link);
?>