En cours

convert php 5.5 code to wordpress proof php 7

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);

Compétences : PHP, Architecture Logicielle

Voir plus : code convert php, code convert php script

Concernant l'employeur :
( 8 commentaires ) Arnhem, Netherlands

N° du projet : #12700578

Décerné à :

doublizer

Hello there. It looks like a simple task that I should be able to deliver quickly. We can discuss more details over chat. Thanks in advance. Best regards, Diogo Bragança

20 $ USD en 1 jour
(9 Commentaires)
2.9

6 freelance ont fait une offre moyenne de 27 $ pour ce travail

Zeldaze

Hi there, Online and ready to get started ASAP. I have reviewed the code and I can have this completed and sent you the updated code within 1-2 hours. All the best, James

40 $ USD en 0 jours
(258 Commentaires)
7.0
mvaqasuddin

hi there, could you please explain me the issue which you are facing with this code ? You can PM me now. Thanks

25 $ USD en 1 jour
(96 Commentaires)
5.8
artiboria

Thank you so much for this great opportunity. I have so much experience in this field to finish this job. My basic technologies are here: WordPress, Magento, Joomla, PHP, PSD to HTML, JavaScript, SEO Plus

25 $ USD en 1 jour
(29 Commentaires)
4.7
nemanjaUD

Hi, I can do that for you. I am graduated computer scientist very skilled with PHP and Mysql. I'll need an hour or so to update your code perfectly into php7. I expect your call. Nemanja You can pay me after I finish Plus

25 $ USD en 1 jour
(1 Commentaire)
0.7
surajkumavat

Hello, Reviewed your post and confident to deliver best outcomes. + Possess 7+ years of experience in WordPress, Plugin development and Theme development. ** Understanding: Convert mentioned code to work on Plus

25 $ USD en 1 jour
(0 Commentaires)
0.0