first off - you must be coming from ASP for that code :P

second - that error is usually due to the SCRIPT_FILENAME being
incorrect. not the code in the script.

On Fri, Dec 19, 2008 at 2:54 PM, Gary Maddock-Greene
<g...@maddock-greene.co.uk> wrote:
> Hi Philip,
>
> Here is my code ...
>
> <?php
> 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);
>
>  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;
> }
> }
>
> $colname_rsSearch = "-1";
> if (isset($_GET['product_name'])) {
>  $colname_rsSearch = $_GET['product_name'];
> }
> mysql_select_db($database_MyDatabase, $MyDatabase);
> $query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE
> %s", GetSQLValueString("%" . $colname_rsSearch . "%", "text"));
> $rsSearch = mysql_query($query_rsSearch, $MyDatabase) or die(mysql_error());
> $row_rsSearch = mysql_fetch_assoc($rsSearch);
> $totalRows_rsSearch = mysql_num_rows($rsSearch);
> ?>
>
> - Gary
>
>
> "Philip Graham" <phi...@lightbox.org> wrote in message
> news:200812191734.10664.phi...@lightbox.org...
>>
>>
>> On December 19, 2008 17:20:32 Gary Maddock-Greene wrote:
>>>
>>> Hi, is it possible to de-bug a 'no input file specified' error. I get the
>>> error when trying to run my search script but do not know whats causing
>>> it.
>>> Is it a common error?
>>
>> What code/command/request is causing the error?
>>
>>>
>>> PHP5 with MySQL adn IIS7
>>>
>>> Thanks
>>>
>>> - Gary
>>
>> --
>> Philip Graham
>> Lightbox Technologies
>> Suite 312 240 Catherine St.
>> Ottawa, ON, K2P 2G8
>> 613-686-1661 ext. 102
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to