<?php | |
$link = mysqli_connect("localhost", "root", "2224psss", "dialer"); | |
/* check connection */ | |
if (mysqli_connect_errno()) { | |
printf("Connect failed: %s\n", mysqli_connect_error()); | |
exit(); | |
} | |
$query = "INSERT INTO `audio` (`audio_id`, `audio_name`, `audio_desc`, `audio_path`, `audio_size`, `audio_date`) | |
VALUES (NULL, 'audio_name', 'Audio desc', 'path', '100MB', CURRENT_TIMESTAMP)"; | |
if(mysqli_query($link, $query)) { | |
printf ("New Record has id %d.\n", mysqli_insert_id($link)); | |
} | |
else { | |
printf("Error: %s\n", mysqli_error($link)); | |
} | |
/* close connection */ | |
mysqli_close($link); | |
?> |
sábado, 25 de julio de 2020
mysql insert
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario