我需要报告以调用null中的成员函数prepare()的报告
$servername = "localhost";
$username = "xxxxxxxxx";
$password = "xxxxxxxxx";
$dbname = "xxxxxxxxx";
$connect_pdf = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
function fetch_customer_data($connect_pdf)
{
$query_1 = "SELECT ad,adet,urunfiyat FROM urunler b LEFT JOIN bilgi c ON (c.id=b.urun) where b.ust='".$_GET["id"]."'";
$query_2 = "SELECT id,ad,soyad,adres,fiyat,email FROM siparisler WHERE id='$_GET[id]'";
$statement = $connect_pdf->prepare($query_1);
$statement->execute();
$result_1 = $statement->fetchAll();
在null中调用成员函数prepare()
$output = '
<div class="table-responsive">
<table class="table table-striped table-bordered">
<tr>
<th>Name</th>
</tr>
';
我需要报告以调用null中的成员函数prepare()的报告
foreach($result_1 as $row)
{
$output .= '
<tr>
<td>'.$row["ad"].'</td>
</tr>
';
}
$output .= '
</table>
</div>
';
return $output;
}