Simple and Small Project in Php ₹600-1500 INR Đã đăng vào hơn 3 năm trước
₹600-1500 INR Thanh toán khi bàn giao
Hello i have a code which is written in mysqli function in PHP but i want to change in param and bind and execute in php look like
$number_filter_row = mysqli_num_rows(mysqli_query($connect, $query));
But i want to change it on
$cpc3 = NULL;
$cpc3 = $_POST["search"]["value"];
$cpc3 = "%$cpc3%";
$cpc3 = "'". $cpc3. "'";
$nrs=$cn->prepare($query);
$nrs->bind_param("sssss",$cpc3,$cpc3,$cpc3,$cpc3,$cpc3);
$nrs->execute();
$nrt = $nrs->get_result();
while($row = $nrt->fetch_assoc())
{
$number_filter_row = $row['row'];
}
ANd all code is here:-
<?php
//[login to view URL]
$connect = mysqli_connect("localhost", "root", "", "test");
$columns = array('meg', 'cpc' ,'os' , 'qa' , 'finance');
$query = "SELECT * FROM user ";
if(isset($_POST["search"]["value"]))
{
$query .= '
WHERE meg LIKE "%'.$_POST["search"]["value"].'%"
OR cpc LIKE "%'.$_POST["search"]["value"].'%"
OR os LIKE "%'.$_POST["search"]["value"].'%"
OR qa LIKE "%'.$_POST["search"]["value"].'%"
OR finance LIKE "%'.$_POST["search"]["value"].'%"
';
}
if(isset($_POST["order"]))
{
$query .= 'ORDER BY '.$columns[$_POST['order']['0']['column']].' '.$_POST['order']['0']['dir'].'
';
}
else
{
$query .= 'ORDER BY id DESC ';
}
$query1 = '';
if($_POST["length"] != -1)
{
$query1 = 'LIMIT ' . $_POST['start'] . ', ' . $_POST['length'];
}
$number_filter_row = mysqli_num_rows(mysqli_query($connect, $query));
print $query
$result = mysqli_query($connect, $query . $query1);
$data = array();
while($row = mysqli_fetch_array($result))
{
$sub_array = array();
$sub_array[] = '<div contenteditable class="update" data-id="'.$row["id"].'" data-column="meg">' . $row["meg"] . '</div>';
$sub_array[] = '<div contenteditable class="update" data-id="'.$row["id"].'" data-column="cpc">' . $row["cpc"] . '</div>';
$sub_array[] = '<div contenteditable class="update" data-id="'.$row["id"].'" data-column="os">' . $row["os"] . '</div>';
$sub_array[] = '<div contenteditable class="update" data-id="'.$row["id"].'" data-column="qa">' . $row["qa"] . '</div>';
$sub_array[] = '<div contenteditable class="update" data-id="'.$row["id"].'" data-column="finance">' . $row["finance"] . '</div>';
$sub_array[] = '<img src="[login to view URL]" id="'.$row["id"].'" class="delete" style="text-align:center">'.'<img src="[login to view URL]" id="'.$row["id"].'" class="edit" style="padding-left:10px;">';
$data[] = $sub_array;
}
function get_all_data($connect)
{
$query = "SELECT * FROM user";
$result = mysqli_query($connect, $query);
return mysqli_num_rows($result);
}
$output = array(
"draw" => intval($_POST["draw"]),
"recordsTotal" => get_all_data($connect),
"recordsFiltered" => $number_filter_row,
"data" => $data
);
echo json_encode($output);
?>
So if anyone can do it then please let lme know
Thanks
Mã dự án: 27961916
Về dự án 6 đề xuất
Dự án từ xa
Hoạt động 3 năm trước
Bạn muốn kiếm tiền? Địa chỉ email Đăng ký các công việc tương tự Lợi ích khi chào giá trên Freelancer Thiết lập ngân sách và thời gian
Nhận thanh toán cho công việc
Phác thảo đề xuất của bạn
Miễn phí đăng ký và cháo giá cho công việc
6 freelancer chào giá trung bình ₹1.167 INR cho công việc này
Hello, I have gone through your project description and I can confirm that l am deem fit to deliver it as expected. I am a senior software developer with plenty of experience and creativity. Kindly contact me so that we can discuss more on the specifics. Thank you
₹1.350 INR trong 1 ngày
5,0 (22 nhận xét) I can change your mysqli statements to PDO in PHP.
Let's chat to discuss more.
I'm a software engineer with specialization in python and PHP.
₹1.450 INR trong 1 ngày
5,0 (9 nhận xét) i can do this task sir . I assured to you that my work quality ll be always good and ll be available 24*7.
₹1.050 INR trong 7 ngày
5,0 (3 nhận xét) Dear Hiring Manger,
As per your details, I am ready for Website Coding. I am a Web expert from last few years and deal with many website.
I have more than 6 years of experience in Web Design , Website development and many more. I had made the 100+ websites .
₹600 INR trong 1 ngày
0,0 (0 nhận xét) respected sir i have knowledge about the php and can do your project and satisfied you to in project.
₹1.250 INR trong 2 ngày
0,0 (0 nhận xét)