Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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

Comment

PREVIOUS NEXT
Code Example
Php :: laravel 8 Target class [FormController] does not exist. 
Php :: make model with migration laravel 
Php :: format money with commas in php 
Php :: php exercises and solutions 
Php :: php echo number with decimal 
Php :: wordpress get the product images 
Php :: logout in php 
Php :: php top frameworks 
Php :: pdo connect 
Php :: php foreach 
Php :: how to replace multiple characters in a string in php 
Php :: get full current url in laravel 
Php :: wordpress set image quality 
Php :: laravel check if model relation exists 
Php :: redirect back with input laravel in request 
Php :: linux delete php sessions 
Php :: enum in laravel migration 
Php :: How to call soap api in php using curl method 
Php :: Laravel Password & Password_Confirmation Validation 
Php :: install php 8 ubuntu 
Php :: how validate array in laravel in request 
Php :: laravel cron job on shared hosting 
Php :: yii2 postgresql connection 
Php :: php get first element of array 
Php :: install php 5.6 on ubuntu 18.04 
Php :: php list directories 
Php :: Composer Fatal error: Call to undefined function SymfonyPolyfillMbstringiconv() in phar 
Php :: php days in month 
Php :: difference entre deux date php 
Php :: laravel 8 validation required if another field is not null 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =