Answers for "echo query php"

SQL
1

php echo sql result

$sql="SELECT * my_table"

$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
    echo $row['fieldname']; 
}
Posted by: Guest on July-03-2021
0

mysql read row

 $sql = "INSERT INTO users (name, surname, sex) VALUES (?,?,?)";$stmt= $pdo->prepare($sql);$stmt->execute([$name, $surname, $sex]);
Posted by: Guest on March-18-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language