[PHP]MySQL erroring

Status
Not open for further replies.

Adil

DevBest CEO
May 28, 2011
1,276
714

MySQL class

global.php

index.php

tpl/habbo/index.php

My error is:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\api\tpl\habbo\index.php on line19
Why is this happening :confused:
 

Xenous

o shi
Nov 15, 2011
383
101
Have you tried

PHP:
<?php
$query=mysql_query("SELECT * FROM `api_hotel`");
while($res=mysql_fetch_array($query)){
echo "<div class='banner'>".$res['hotel_name']."</div>";
}
?>
Sometime it makes a difference not sure in this scenario.
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,926
3,921
You never connected via mysql_connect, as you are using mysql functions to get the data. You connected via mysqli, which is totally separate from mysql.
 
Status
Not open for further replies.

Users who are viewing this thread

Top