それは、インラインデータを作成するための良い方法であり、Angularjsのphpとmysqlを使った請求書アイテムです。 ?これはid
、payPrice
、payStatus
、clientAddress
をelemetsとitems
Contantを請求書intemsデータを持つネストされた配列でどのように配列をインボイスデータとAngularjsのPHPとmysqlで作成する
は、私は配列を持って欲しいです。
$result = $db->query("select `id`,`payPrice`,`payStatus`,`clientAddress`
from `invoice` where `clientId`=22");
if($result && $result->num_rows>0){
if($row=$result->fetch_assoc()){
$result1 = $db->query("select * from `invoice_items` where `invoiceId`=". $row['id']);
if($result1 && $result1->num_rows>0){
$row["items"]=$result1;
return $row;
}else{return false;}
}else{return false;}
}else{return false;}
私はここで2番目の結果を編集しました。 –
申し訳ありませんが私は理解できませんか? – RiggsFolly