PHPBuilder - MakeSql



RSS Twitter
Snippets Algorithms

MakeSql

by: Eduardo Figueroa
|
June 20, 2002

Version: 1.1

Type: Function

Category: Algorithms

License: GNU General Public License

Description: As The Name Says :-)



function  MakeSql($value){
	if ($value =="" && strlen($value)>0){
		$fvalue = "null";
		}
	else {
		$tvalue = str_replace("'",'\'',$value);
		$fvalue = "'";
		$fvalue .= $tvalue;
		$fvalue .= "'";
	}
	return $fvalue;
}
/*
example :
$USERNAME="Snake's";
$USERNAME=MakeSql($USERNAME);
echo $USERNAME;
*/

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Eduardo Figueroa

Comment:



Comment:

(Maximum characters: 1200). You have characters left.