Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/08/2011, 19:59
totolia
 
Fecha de Ingreso: mayo-2008
Mensajes: 315
Antigüedad: 16 años, 9 meses
Puntos: 7
Error idiota Mysql

Pues tengo un error que no se ha que viene por mucho que lo reviso no veo nada mal.


Esta es la consulta
Código PHP:
$invita md5(rand(0,999));
$tiempo time();
$sql2 "INSERT INTO smf_invites SET invite_id='', key='".$invita."', active='1', member_id='1', member_name='totolia', time='".$tiempo."'";
if(@
mysql_query($sql2)) {
} else {
echo 
mysql_error();

Y esta es la base de datos, por mucho que lo miro no veo el problema todo esta bien.

Campo Tipo Cotejamiento Atributos Nulo Predeterminado Extra
invite_id int(4) UNSIGNED No auto_increment
key varchar(255) utf8_general_ci No
active tinyint(1) UNSIGNED No
member_id tinyint(3) UNSIGNED No
member_name varchar(255) utf8_general_ci No
time int(10) UNSIGNED No 0

Y el error es el siguiente:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key='ec5aa0b7846082a2415f0902f0da88f2', active='1', member_id='1', member_name='' at line 1