1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| <?php
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json; charset=utf-8');
try{
include('config.php');
include('pdo2.php');
$pdo = PDO2::getInstance();
$etatsmat=0;
$pdo->exec("SET CHARACTER SET utf8");
$requete_prepare_1=$pdo->prepare("select count(*) from information_schema.columns where table_schema = 'movebdd' and table_name='maTab'");
$lignes=$requete_prepare_1->fetch(PDO::FETCH_OBJ);
$json['count'] = $lignes->count;
$requete_prepare_1->closeCursor();
$json['success'] = true;
echo json_encode($json);
}catch(PDOException $e) {
echo 'Error:'.$e->getMessage();
}
?> |