
07/03/2011, 13:58
|
| | Fecha de Ingreso: febrero-2011
Mensajes: 43
Antigüedad: 14 años Puntos: 2 | |
Respuesta: SELECT ID FROM TABLE WHERE NAME = 'Carlos' Cita:
Iniciado por gnzsoloyo Si estás usando PHP, lo más simple es que recuperes el valor del ID con la función [URL="http://ar.php.net/manual/es/function.mysql-insert-id.php"]mysql_insert_id() [/URL]de PHP. Código PHP: $result = mysql_query("INSERT INTO mytable (product) values ('kossu')");
if($result)
{
$idNuevo = mysql_insert_id();
}
|