<ol
class
=
"dp-c"
>
<li
class
=
"alt"
><span><span><?php </span></span></span></li>
<li><span> </span></li>
<li
class
=
"alt"
>
<span
class
=
"comment"
>
</span><span> </span></span></li>
<li
class
=
"alt"
><span> </span></li>
<li>
<span
class
=
"comment"
>
</span><span> </span></span></li>
<li
class
=
"alt"
>
<span
class
=
"keyword"
>
class
</span><span> Order { </span>
</li>
<li><span> </span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"comment"
>
</span><span> </span></span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"keyword"
>
private
</span><span> </span><span
class
=
"vars"
>
$_order_id
</span><span>; </span>
</li>
<li><span> </span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"comment"
>
</span><span> </span></span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"keyword"
>
private
</span><span> </span><span
class
=
"vars"
>
$_customer_id
</span><span>; </span>
</li>
<li><span> </span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"comment"
>
</span><span> </span></span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"keyword"
>
private
</span><span> </span><span
class
=
"vars"
>
$_amount
</span><span>; </span>
</li>
<li><span> </span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"keyword"
>
public
</span><span> </span><span
class
=
"keyword"
>
function
</span><span> __construct(</span><span
class
=
"vars"
>
$order_id
</span><span>, </span><span
class
=
"vars"
>
$customer_id
</span><span>, </span><span
class
=
"vars"
>
$amount
</span><span>) { </span>
</li>
<li>
<span> </span><span
class
=
"vars"
>
$this
</span><span>->_order_id = </span><span
class
=
"vars"
>
$order_id
</span><span>; </span>
</li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"vars"
>
$this
</span><span>->_customer_id = </span><span
class
=
"vars"
>
$customer_id
</span><span>; </span>
</li>
<li>
<span> </span><span
class
=
"vars"
>
$this
</span><span>->_amount = </span><span
class
=
"vars"
>
$amount
</span><span>; </span>
</li>
<li
class
=
"alt"
><span> } </span></li>
<li><span> </span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"comment"
>
</span><span> </span></span></li>
<li>
<span> </span><span
class
=
"keyword"
>
public
</span><span> </span><span
class
=
"keyword"
>
function
</span><span> </span><span
class
=
"func"
>
delete
</span><span>() { </span>
</li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"vars"
>
$sql
</span><span> = </span><span
class
=
"string"
>
"DELETE FROM Order SET WHERE order_id = "
</span><span> . </span><span
class
=
"vars"
>
$this
</span><span>->_order_id . </span><span
class
=
"string"
>
" AND customer_id = "
</span><span> . </span><span
class
=
"vars"
>
$this
</span><span>->_customer_id; </span>
</li>
<li>
<span> </span><span
class
=
"keyword"
>
return
</span><span> DB::query(</span><span
class
=
"vars"
>
$sql
</span><span>); </span>
</li>
<li
class
=
"alt"
><span> } </span></li>
<li><span> </span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"comment"
>
</span><span> </span></span></li>
<li>
<span> </span><span
class
=
"keyword"
>
public
</span><span> </span><span
class
=
"keyword"
>
function
</span><span> update() { </span>
</li>
<li
class
=
"alt"
><span> } </span></li>
<li><span> </span></li>
<li
class
=
"alt"
>
<span> </span><span
class
=
"comment"
>
</span><span> </span></span></li>
<li>
<span> </span><span
class
=
"keyword"
>
public
</span><span> </span><span
class
="keywo </p>
"></span>
</li>
</ol>