btw, I think I could not explain the question correctly. I want this..
This function is escaping the given data for string type and prapare it for insertion. So we can insert this data in to any mysql String Types. Same like there are Numeric Types and Date & Time Types. You might have looked in ADO.NET, there is parameter collection where we can define the data as DBTYPE.INT, DBTYPE.BIT so on before insertion. I was guessing is there any function that can do this job.
$sql = "INSERT INTO %s(id, agg_number, app_date, inv_number, account_type, status) VALUES (%d, '%s', '%s', '%s', '%d', '%s')";
$sql = sprintf($sql, $this->tableName,