
Originally Posted by
Leon Muhkuh
Well met friends,
Im having problems with the Final Hell v2 Homepage..
Im getting this error now ... Any advices how to deal with this? Im a total noob with PHP. thanks boys
Warning: sqlsrv_has_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\function\func.home.php on line 15
Better yet. I recommend you learn PHP. It's one of the most recommended to learn, and it's actually useful in the real world.
Read this book that the creator of PHP helped write: http://www.amazon.com/Programming-PH...5588748&sr=1-1
That's the one i learned from. Just read it over. And take notes on how to do most of the constructs. Once you learn one programming language. Learning others goes easier. Like C# is similar to PHP for instance.
That'll give you the basis you need period. Then go learn a really good framework written in PHP. Such as Laravel. And that can be used to stream line your website creation.
Here's the example code straight from the PHP Manual itself:
Code:
<?php
$server = "serverName\sqlexpress";
$connectionInfo = array( "Database"=>"dbName", "UID"=>"username", "PWD"=>"password" )
$conn = sqlsrv_connect( $server, $connectionInfo );
$stmt = sqlsrv_query( $conn, "SELECT * FROM Table_1");
if ($stmt) {
$rows = sqlsrv_has_rows( $stmt );
if ($rows === true)
echo "There are rows. <br />";
else
echo "There are no rows. <br />";
}
?>