MySQL Forums
Forum List  »  PHP

Re: Diagnose errors retrieving data using php and PDO
Posted by: Peter Brawley
Date: June 12, 2018 10:23AM

> I think I can make a connection to the database successfully

You think? The code must indicate that definitely, eg ...

$conn = mysqli_connect(...) or exit( mysqli_conect_error() );

Likewise for queries ...

$qry = "...";
$res = mysqli_query( $conn, $qry ) or exit( mysqli_error($conn) );

Also for fetches &c.

Options: ReplyQuote


Subject
Written By
Posted
Re: Diagnose errors retrieving data using php and PDO
June 12, 2018 10:23AM


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.