cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Unable to get data from databse

hi , i am unable to get data from my database hosted in godaddy although i m able to connect to my database but its not returning any data from table i created.

 

this is the link 

http://www.xyzcrafts.com/ArConnect.php

 

i m a unity developer and learning backend.but i have tried my sqlquery with local host with xamp server and its working..so i dont know whats wrong.

2 REPLIES 2

Re: Unable to get data from databse

this is my code for getting data from table

 

$sql = "SELECT ID, VideoURL, VideoName FROM arvideo " ;
$result = mysqli_query($conn , $sql);


if(mysqli_num_rows($result) > 0){
// show data for each row
while ($row = mysqli_fetch_assoc($result)){
echo "ID:".$row['ID'] . "|VideoURL:" .$row['VideoURL'] . "|VideoName:".$row['VideoName']. ";";
}
}
else {
die(mysqli_error($conn));
echo 'Whole query: ' . $sql;
}

 

 

its working in local server but not in here

Re: Unable to get data from databse

just wanna update , my table has two rows..buts its not returning any.i have run the sql in database and the sql is returning two rows..but its not working with the above link...i dont really understand what could be the problem...i have tried deleting the table and reimporting with no luck..