senza if e else funziona la query,
solo con

Codice PHP:
$insert "insert into accounting (`photoLimit`,`item`,`payment_gross`,`payment_status`,`active`,`payment_date`,`mid`,`title`,`description`,`days`,`numCredit`) 
                        values ("
.$credit['photoLimit'].",'3','0','FREE','Yes',NOW(),".$_SESSION['memberID'].",'".$credit['title']."','".$credit['description']."',".$credit['days'].",".$credit['numCredit'].")";
    
//echo $insert;
    
mysql_query($insert,$myconn) or die(mysql_error());
    
    
$updateSQL sprintf("UPDATE members SET `expires`=DATE_ADD(NOW(), INTERVAL ".$credit['days']." DAY) WHERE id=%s",
                                  
$_SESSION['memberID']);

                       
mysql_query($updateSQL,$myconn) or die(mysql_error());
                       
    
$insertGoTo "a_index.php";
    
header(sprintf("Location: %s"$insertGoTo));
    function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "'" doubleval($theValue) . "'" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;

funziona... com'è possibile?