mi da questo errore sull'inserimento della tabella agenziaemail.
qualcuno sa dirmi il perchè?
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 '' at line 1
nella linea 1 non c'è niente di strano è uguale alle altre pagine php che funzionano:
<?php require_once('Connections/agenzie.php'); ?>
<?php
_________________________________
Codice PHP:
//ricerca se emails esistono già e inserimento
$findemail1 = sprintf("SELECT * FROM email WHERE email = '%s'", $_POST['email1']);
$resemail1 = mysql_query($findemail1, $agenzie) or die(mysql_error());
$okemail1=mysql_fetch_row($resemail1);
if (!$okmail1){
if ($_POST['email1']!=''){
$insertemail1 = sprintf("INSERT INTO email VALUES (%s)",
GetSQLValueString($_POST['email1'], "text"));
$resinsemail1 = mysql_query($insertemail1, $agenzie) or die(mysql_error());
//aggiorno tabella agenziaemail
$insertUemail1 = sprintf("INSERT INTO emailagenzia (idagenzia, email) VALUES (%s, s%)",
GetSQLValueString($_POST['idagenzia'], "int"),
GetSQLValueString($_POST['email1'], "text"));
$resinsUemail1 = mysql_query($insertUemail1, $agenzie) or die(mysql_error());
}
}