> the select query is > > $selectqueryusername = sprintf("Select username from individuals where > username='%s'", mysql_real_escape_string($username)); The syntax is fine. $result = mysql_query($selectqueryusername); if (!$result) { echo "Error! *** " . mysql_error(); } > also for insert query if i have a numeric value i should be writting %d > correct, i have a numeric value however before inserting that > numeric value i am appending a character "-" to combine area code and phone > number example 09-123 4567 so i am considering this as %s as there is a > character. is this correct. Yes. The placeholders are all documented pretty well: http://www.php.net/sprintf -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php