Selesai

convert php 5.5 code to wordpress proof php 7

Proyek ini berhasil diselesaikan oleh doublizer dengan harga $20 USD dalam sehari.

Dapatkan penawaran gratis untuk proyek seperti ini
Pemberi kerja bekerja
Anggaran Proyek
$10 - $30 USD
Diselesaikan Dalam
1 hari
Total Penawaran
6
Deskripsi Proyek

I need this code to be converted to php7

and use the wordpress $wpdb code for it

$subcat_no = mysql_query("SELECT `position`

FROM

(

select @rownum:=@rownum+1 `position`, p.*

from `wp_health_attributs2` p, (SELECT @rownum:=0) r

Where `health_id` = '".$_POST['cat']."' AND `pakketnaam` != ''

order by id

) s

WHERE `pakketnaam` = '".$_POST['subcat']."'

");

$subcat_no = mysql_fetch_array($subcat_no);

$cat = $_POST['cat'];

$subcat = $subcat_no['position'];

$res_arr = array();

if($row['Insurance_id_'.$cat.'_'.$subcat] == null){

$compansation = 0;

}else{

// dit is met tarief een . en geen , $res_arr['cost'] = round($row['Tarief_2017'],2);

$tarief_comma = $row['Tarief_2017'];

$tarief_punt = str_replace(',', '.', $tarief_comma);

$compansation = ($tarief_punt * $row['Insurance_id_'.$cat.'_'.$subcat])/100;

}

$fields = mysql_list_fields('vmondzorg_db','tarieven');

$columns = mysql_num_fields($fields);

for ($i = 0; $i < $columns; $i++) {$field_array[] = mysql_field_name($fields, $i);}

if (in_array('Insurance_id_'.$cat.'_'.$subcat.'_L', $field_array))

{

$sql_limit = "SELECT Insurance_id_".$cat."_".$subcat."_L as cell_limit FROM tarieven WHERE Prestatie_Code = '".$_POST['token']."'";

$result_limit = mysql_query($sql_limit);

if(mysql_num_rows($result_limit) > 0){

$row_limit=mysql_fetch_array($result_limit);

if($row_limit['cell_limit'] != '' && $row_limit['cell_limit'] != null){

$res_arr['cell_limit'] = round($row_limit['cell_limit'],2);

}else{

$res_arr['cell_limit'] = '-1';

}

}else{

$res_arr['cell_limit'] = '-1';

}

}else{

$res_arr['cell_limit'] = '-1';

}

// dit is met tarief een . en geen , $res_arr['cost'] = round($row['Tarief_2017'],2);

$tarief_comma = $row['Tarief_2017'];

$tarief_punt = str_replace(',', '.', $tarief_comma);

$res_arr['cost'] = round($tarief_punt,2);

$res_arr['compansation'] = round($compansation,2);

$res_arr['description'] = wordwrap($row['Omschrijving'], 70, "<br />\n");

$res_arr['extra_cost'] = $row['Techniek'];

$res_arr['percentage'] = $row['Insurance_id_'.$cat.'_'.$subcat];

//$res_arr['true_cost'] = round(($row['Tarief_2017'] - $compansation),2);

echo json_encode($res_arr);

Ingin menghasilkan uang?

  • Atur anggaran Anda dan jangka waktunya
  • Uraikan proposal Anda
  • Dapatkan bayaran atas pekerjaan Anda

Pekerjakan para freelancer yang juga menawar di proyek ini

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online