Re: Re: Simple Search Logic Issue...
| From: | revDAVE | Date: | Sun, 15 Feb 2009 17:36:29 +0000 |
| Subject: | Re: Re: Simple Search Logic Issue... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288284@lists.php.net to get a copy of this message | ||
On 2/15/2009 3:32 AM, "David Robley" <robleyd@aapt.net.au> wrote:
> If you are using that syntax, I'd suggest echoing your query to make sure
> that it is as it should be; I'm wondering if you are actually enclosing
> string values in single quotes in your query?
Another part of the dw cs3 code uses switch - that seems to do as you
mentioned...
if (!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);
Here....
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'"
: "NULL";
break;
etc.............
--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]