1 2 3 4 5 6 7 8 9 10 11 12
|
<?php
$conn = mysqli_connect("localhost","root","","rli_vernalis") or die ("connection fail");
$sql = "SELECT id_article , titre , extra_intitule , extra_descriptifoffre , extra_datedebut , extra_horairesoffre , extra_nbpostes , extra_salaire , extra_experience , extra_formation , extra_autre , extra_typecontrat , extra_commune FROM spip_articles WHERE statut LIKE 'publie' AND id_rubrique = '46'";
$result = (mysqli_query($conn,$sql)) or die ("fail 1");
while($row=mysqli_fetch_assoc($result))
{
$output[]=$row;
}
print json_encode($output);
?> |
Partager