Answers for "MYSQL_ASSOC, MYSQL_NUM, et MYSQL_BOTH"

PHP
0

mysql_fetch_array php

<?php
mysql_connect("localhost", "mysql_user", "mysql_password") or
die("Impossible de se connecter : " . mysql_error());
mysql_select_db("mydb");

$result = mysql_query("SELECT id, name FROM mytable");

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
   printf("ID : %s  Nom : %s", $row[0], $row[1]);
}

mysql_free_result($result);
?>
Posted by: Guest on May-28-2020
0

MYSQL_ASSOC, MYSQL_NUM, et MYSQL_BOTH

4
52
5
Posted by: Guest on September-13-2021

Browse Popular Code Answers by Language