php fetch mysql result as variable

Solutions on MaxInterview for php fetch mysql result as variable by the best coders in the world

showing results for - "php fetch mysql result as variable"
Ariadna
06 Sep 2019
1<?php
2$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
3if (!$result) {
4    echo 'Could not run query: ' . mysql_error();
5    exit;
6}
7?>