Simple and Small Project in Php ₹600-1500 INR Opublikowano ponad 3 lata temu
₹600-1500 INR Płatne przy odbiorze
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
Identyfikator projektu: 27961916
Informację o projekcie 6 ofert
Zdalny projekt
Aktywny 3 lata temu
Szukasz sposobu na zarobienie pieniędzy? Adres e-mail Aplikuj do podobnej pracy Korzyści ze składania ofert na Freelancer.com Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
6 freelancerzy składają oferty o średniej wysokości ₹1 167 INR dla tej pracy
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 w 1 dzień
5,0 (22 opinii) 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 w 1 dzień
5,0 (9 opinii) 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 w 7 dni
5,0 (3 opinii) 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 w 1 dzień
0,0 (0 opinii) respected sir i have knowledge about the php and can do your project and satisfied you to in project.
₹1 250 INR w 2 dni
0,0 (0 opinii)