Find Jobs
Hire Freelancers

PDO if statement

$10-30 USD

Completed
Posted about 5 years ago

$10-30 USD

Paid on delivery
Here is the code. If there are not records /result I want it to say "No Records Were Found" otherwise the results will show. I have been working with this for a couple of hours and for some reason I just can not get it to work if a PHP if statement... <?php $log_id = $result['log_id']; $query = "SELECT * FROM calls_for_service WHERE log_id = :log_id "; $stmt = $handler->prepare($query); $stmt->bindParam(':log_id', $log_id, PDO::PARAM_INT); $stmt->execute(); $result = $stmt->fetchAll(); foreach ( $result as $row ) { ?> <div class="container" style="background-color: #ffffff;"> <div class="row" align="left" style="color:black;"> <br> <div class="col-sm-2"> <font size="2"><strong> Case # &nbsp; </strong></font> </div> <div class="col-sm-1"> <font size="2"><strong>Call Time &nbsp; </strong></font> </div> <div class="col-sm-1"> <font size="2"><strong> Arrival &nbsp; </strong></font> </div> <div class="col-sm-1"> <font size="2"><strong> In Service &nbsp; </strong></font> </div> <div class="col-sm-5"> <font size="2"><strong> Actions &nbsp; </strong></font> </div> <div class="col-sm-1"> <font size="2"><strong> Edit &nbsp; </strong></font> </div> <div align="center" class="col-sm-1"> <font size="2"><strong> Delete &nbsp; </strong></font> </div> </div> <br> </div> <div class="container" style="background-color: #ffffff;"> <div align="left" class="row"> <div class="col-sm-2"> <em><font color="#008080"><?php echo $row['case_number']; ?></font></em> </div> <div class="col-sm-1"> <em><font color="#008080"><?php echo $row['time_of_call']; ?></font></em> </div> <div class="col-sm-1"> <em><font color="#008080"><?php echo $row['time_of_arrival']; ?></font></em> </div> <div class="col-sm-1"> <em><font color="#008080"><?php echo $row['time_in_service']; ?></font></em> </div> <div class="col-sm-5"> <em><font color="#008080"><?php echo $row['action']; ?></font></em> </div> <div class="col-sm-1"> <a href="call_for_service/[login to view URL]<?php echo $row['call_id']; ?>"><em><font color="#990000">Edit</font></em></a> </a> </div> <div class="col-sm-1"> <a href="call_for_service/[login to view URL]<?php echo $row['call_id']; ?>"><em><font color="#990000">Delete</font></em></a> </div> </div> <br> </div> <?php } ?> <br><br>
Project ID: 18525295

About the project

7 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
HI, i can help you here. Please come over chat and discuss in details. Thanks. ................................................
$10 USD in 1 day
5.0 (37 reviews)
5.2
5.2
7 freelancers are bidding on average $16 USD for this job
User Avatar
Hi there, Quick and easy. Consider it done in the next 5 minutes. Seriously! I have a 99% project completion rate and a 4.99 reputation (out of max 5.0!) from more than 1150 projects from a period of 12 years. Thanks. I look forward to hearing from you! Best Regards, Rajesh Soni.
$15 USD in 0 day
5.0 (979 reviews)
8.7
8.7
User Avatar
Hello, if you award my bid I can send you code which displays "no records" etc. I can do it in 15 min.
$15 USD in 1 day
5.0 (910 reviews)
8.3
8.3
User Avatar
Hi, I can show "no records found" message when no records from database are fetched. I am certain I can do it.
$25 USD in 1 day
5.0 (375 reviews)
7.3
7.3
User Avatar
We Believe in Delivering Perfect Work and Providing Full Satisfaction to Our Client . We also Insure to Deliver the Work in the given Time Frame . we have highly Qualified Professionals in our team. Expertise in Photoshop, HTML , CSS, Javascript , PHP , yii2, laravel, NodeJs , AngularJs , ionic, AJAX , SQL , Crom Extension,Python MongoDB , Wordpress , Game Development and all the related Web Technologies.
$15 USD in 0 day
4.7 (23 reviews)
4.6
4.6
User Avatar
sure, inbox me and i can do it, today if u want, using motor in real time to see whats ur error, so write me
$25 USD in 0 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I can do it if u give me chance i ll never let u down i need reviews here i ll provide u work with full satisfication and perfection
$10 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Port Charlotte, United States
5.0
47
Payment method verified
Member since Apr 30, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.