scottreid1974 Posted January 27, 2007 Share Posted January 27, 2007 HiWhat is this that dreamweaver user at the top of a php page, i cant find it anywhere else?thanks<?php require_once('Connections/testconn1.php'); ?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;}}?> Link to comment https://forums.phpfreaks.com/topic/35947-what-is-this/ Share on other sites More sharing options...
wildteen88 Posted January 27, 2007 Share Posted January 27, 2007 Thats the code Dreamweaver generates when you use its built in database query tools. Link to comment https://forums.phpfreaks.com/topic/35947-what-is-this/#findComment-170493 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.