lundi 4 novembre 2019

i need to fetch only the new record from database and show it in table and after that i want to add it with customer detail and produce bill

i want to create wen aaplication in which user select multiple product and then add customer info and create a report of it..i want to fetch only that records which is newly added to the database table and then coustomer detail add to that record ..anyone can hlep plz

<?php 
if(isset($_GET['masg']) && $_GET['masg'] = 'added'){
    $fetchqurey="select * 
                from purchased_product 
                order by id desc ";
    $excute=mysqli_query($conn,$fetchqurey);
    $i=1;
    while($fetchrecord=mysqli_fetch_array($excute)){

?>

    <tr>
        <td><?php if(isset($fetchrecord)) {  echo $fetchrecord['pro_name']; }  else { echo '' ;}?></td>
        <td><?php if(isset($fetchrecord)) {  echo $fetchrecord['part_number']; }  else { echo '' ;}?></td>
        <td><?php if(isset($fetchrecord)) {  echo $fetchrecord['total_items']; }  else { echo '' ;}?></td>
        <td><?php if(isset($fetchrecord)) {  echo $fetchrecord['sale_price']; }  else { echo '' ;}?></td>
        <td><?php if(isset($fetchrecord)) {  echo $fetchrecord['date']; }  else { echo '' ;}?></td>
        <td></td>
    </tr>
<?php 
        $i++;
    }
}
?>



Aucun commentaire:

Enregistrer un commentaire