$db=mysql_select_db($base,$conexion);
$insert_patro=$codigopatro;
$sqlpatro="INSERT INTO $insert_patro (Clave)
VALUES(\"$claveAfiliado\")";
$resultado = mysql_query($sqlpatro,$conexion)or die("Couldn't execute query: $sqlpatro, error: " . mysql_error());
HOla este es mi codigo y me marca un error sql.
Couldn't execute query: INSERT INTO 2 (Clave) VALUES("109"), error: 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 '2 (Clave) VALUES("109")' at line 1
como lo resuelvo