MySQL Forums
Forum List  »  PHP

Re: Very New - PHP/SQL Select problem
Posted by: Edward Frey
Date: December 04, 2015 02:08PM

$conn = ,ysqli_connect(...);
$sql="...";
$result=mysqli_query($conn,$qry) or exit( mysqli_error($conn) );
I changed this to
$conn = mysqli_connect(yada, yada...);
$sql="...";
$result=mysqli_query($conn,$sql) or exit( mysqli_error($conn) );

This got me past the Died or No Database Selected error that I had been getting.

Now I am getting an error with the fetch line.
$row = mysql_fetch_assoc($result);
echo $maxtop;
This coding gives me:Warning: mysql_fetch_assoc() expects parameter 1 to be resource, object given in /home.....

$row = mysqli_fetch_assoc($result);
echo $maxtop;
Gives me NOTHING

I assume I have the same problem with both sets of code but the Warning does not help me much. I'm more than willing to try and fix this if someone can point me in the direction where I can get some information that can understand. I am not very fluent in Geek Speek.

Options: ReplyQuote


Subject
Written By
Posted
Re: Very New - PHP/SQL Select problem
December 04, 2015 02:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.