cheap nfl jerseys china cheap nfl jerseys free shipping wholesale nfl jerseys china wholesale jerseys from china cheap nfl jerseys free shipping cheap nfl jerseys for sale cheap jerseys free shipping wholesale nfl jerseys from china cheap nfl jerseys sale cheap nike nfl jerseys china wholesale jerseys free shipping cheap nfl jerseys wholesale wholesale nfl jerseys online cheap nfl jerseys wholesale china jerseys wholesale cheap coach handbags outlet authentic designer handbags cheap coach handbags outlet cheap coach purses outlet discount coach bags coach bags sale coach purse outlet cheap real coach purses coach handbags sale online coach purse outlet michael kors outlet online store cheap michael kors bags cheap michael kors purse michael kors factory outlet online cheap michael kors handbags cheap michael kors purses michael kors bags outlet online cheap michael kors purse michael kors handbags discount cheap michael kors purse michael kors handbags discount
cheap nfl jerseys china cheap nfl jerseys free shipping wholesale nfl jerseys china wholesale jerseys from china cheap nfl jerseys free shipping cheap nfl jerseys for sale cheap jerseys free shipping wholesale nfl jerseys from china cheap nfl jerseys sale cheap nike nfl jerseys china wholesale jerseys free shipping cheap nfl jerseys wholesale wholesale nfl jerseys online cheap nfl jerseys wholesale china jerseys wholesale cheap coach handbags outlet authentic designer handbags cheap coach handbags outlet cheap coach purses outlet discount coach bags coach bags sale coach purse outlet cheap real coach purses coach handbags sale online coach purse outlet michael kors outlet online store cheap michael kors bags cheap michael kors purse michael kors factory outlet online cheap michael kors handbags cheap michael kors purses michael kors bags outlet online cheap michael kors purse michael kors handbags discount cheap michael kors purse michael kors handbags discount
errori.php
gestione errori

operazioni MySQL
le funzioni mysql_ restituiscono sempre e comunque un risultato, che vale 1 in caso di successo. In caso di insuccesso, mysql_error() restituisce il messaggio di errore. Esempio:

$results = mysql_connect (localhost, "", ""); if ($results!=1) { print "Error: ".mysql_error()."<br>";} $results = mysql_select_db ("test"); if ($results!=1) { print "Error: ".mysql_error()."<br>";} $results = mysql_query ("INSERT INTO visitors (first_name, last_name) VALUES ('$first_name', '$last_name')"); if ($results!=1) { print "Error: ".mysql_error()."<br>";}

query MySQL
per le query, si pu� controllare il numero di righe restituite: mysql_num_rows(). Esempio:

$tabella = mysql_query ("SELECT * FROM tablename WHERE first_name = '$first_name' AND last_name = '$last_name'"); $righe = mysql_num_rows($tabella); if ( $righe >= 1 ){ print "Selezionate ".$righe." righe.";} else { print "Non � stato selezionato nulla."; exit;}

delete MySQL
per le delete, si pu� controllare il numero di righe affette: mysql_affected_rows(). Esempio:

$deleteresult = mysql_query ("DELETE FROM tablename WHERE first_name = '$first_name' AND last_name = '$last_name'"); if (mysql_affected_rows($deleteresult) == 1){ print "Your DELETE query was successful.";} elseif (mysql_affected_rows($deleteresult) != 1){ print "Your DELETE query was not successful."; exit;}

 

~giorgio