> I am guessing it is an issue with the php install.
?! The issue is most often what the programmer has written.
A simple example of polling for errors ...
<?php
$conn = mysqli_connect( ... )
or exit( mysqli_connect_error() ;
$sql = "select * from test where id > ?";
$ival = 3;
$ctypes = "i"; // mysqli_stmt_bind_param() wants this param by ref
$stmt = mysqli_stmt_init( $conn );
if( !mysqli_stmt_prepare($stmt,$sql) ) {
exit( $conn->error );
}
elseif( !mysqli_stmt_bind_param($stmt,$ctypes,$ival) ) {
exit( $conn->error );
}
elseif( !mysqli_stmt_execute($stmt) ) {
exit( $conn->error );
}
elseif( $res=mysqli_stmt_get_result($stmt) ) {
while( $row=mysqli_fetch_row($res) ) {
print_r($row);
}
}
else {
exit( $conn->error );
}
?>
Once you've played around with this snippet, weeing what happens when you create deliberate errors &c, read about and try out other error handling methods eg try/catch.
Edited 1 time(s). Last edit at 03/20/2021 10:00AM by Peter Brawley.