var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Is there a MSSQL Equivalent to mysql_num_rows()?
I am trying to find an equivalent to the MySQL function mysql_num_rows() that returns the number of rows returned in a result set.
I only found COUNT, but that doesnt work...
I am working on a web authentication system. The User enters UN and PW, which is then checked with the DB.
//connect to the mssql server
//select the database to use
$query = "SELECT * from $table WHERE username='$username' AND pwd='$pwd'";
echo $bla; // just to see if it works
echo ("welcome $username");
echo ("auth required");
$bla always returns 1... regardless of the UN and PW have been entered and whether they match an entry in the DB
the obvious is slapping my face.
The 1 signifies that the query is executed, it is not the count of the resultset. If you are really looking at a good abstraction layer for database access in PHP, check
It is very easy to use.
I'd do it like this:
$query = "if exists(SELECT * from $table WHERE username='$username' AND pwd='$pwd') select RetVal=1 else select RetVal=0"