Code: Select all
Warning: mysqli::prepare() [mysqli.prepare]: All data must be fetched before a new statement prepare takes place in E:\xampp\nothing\inc\classes.php on line 489
Code: Select all
if ( $st = $mysqli->prepare( "SELECT ...") )
{
$st->bind_param( ... );
$st->execute();
$st->bind_result( $result );
while( $st->fetch() )
{
$p = new Post( $result );
$p->display();
}
$st->close();
}
// Then display looks something like:
var $result;
function display()
{
echo "The result is: " . $this->result;
// The error is coming from this line:
if ( $st = $mysqli->prepare( ... ) )
{
$st->bind_param( ... );
$st->execute();
$st->bind_result( ... );
echo "something";
$st->close();
}
}
<3
Thankies