In my application, I’ve some grids and form that I load from mysql tables.
It works fine in PHP 5.6 but no data is loaded with PHP 7.1
Here is the code : gridcontacts.php
<?php require ("../connector/grid_connector.php"); require ("configDB.php"); $res = mysql_connect($srv, $user, $pwd); if (!$res) { die('Connexion impossible: ' . mysql_error()); } mysql_select_db("gestco"); $sql = "SELECT id_contact, genre.designation as genre, nom, prenom, telephone_fixe, mobile, email, fact_adrs_1, fact_adrs_2, fact_codepost, fact_ville FROM contacts INNER JOIN genre ON (genre.id_genre = contacts.id_genre)"; $conn = new GridConnector($res); $conn->render_sql($sql,"id_contact","id_contact,genre,nom,prenom,telephone_fixe,mobile,email,fact_adrs_1,fact_adrs_2,fact_codepost,fact_ville"); ?>Here is the part of code to load a grid
contactGrid = myLayout.cells(“b”).attachGrid();
contactGrid.setHeader(“,Genre,Nom,Prénom,N° Téléphone Fixe,Mobile,e-Mail,Adresse Facturation 1,Adresse Facturation 2,Code Postal,Ville Facturation”);
contactGrid.setColumnIds(“id_contact,id_genre,nom,prenom,telephone_fixe,mobile,email,fact_adrs_1,fact_adrs_2,fact_codepost,fact_ville”);
contactGrid.setColTypes(“ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro”);
contactGrid.setInitWidths(“25,50,200,180,130,130,200,200,200,100,220”);
contactGrid.enableAutoWidth();
contactGrid.attachEvent(“onRowDblClicked”, doOnRowDblClicked);
contactGrid.init();
contactGrid.load(“php/gridcontacts.php”);
How can I fixe this ?
Thanks for your help