Hi
Not sure about which line you mean so i decided to provide the whole script.
This PHP will eventually will inserted into a html template.
I created this with Dreamweaver CS4 by the way.
<?php require_once('Connections/date.php'); ?>
<?php require_once('../Connections/search_db.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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;
}
}
mysql_select_db($database_date, $date);
$query_rs84 = "SELECT Date, String FROM search";
$rs84 = mysql_query($query_rs84, $listings) or die(mysql_error());
$row_rs84 = mysql_fetch_assoc($rs84);
$totalRows_rs84 = mysql_num_rows($rs84);
$coldate_rs83 = "=1";
if (isset($GET['date'])) {
$coldate_rs83 = $GET['date'];
}
mysql_select_db($database_search_db, $search_db);
$query_rs83 = sprintf("SELECT * FROM search WHERE Date = GetSQLValueString($coldate_rs83, "text"));
$rs83 = mysql_query($query_rs83, $search_db) or die(mysql_error());
$row_rs83 = mysql_fetch_assoc($rs83);
$totalRows_rs83 = mysql_num_rows($rs83);
?>