Re: Help with a Search Function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Terion wrote:

> Hey Everyone, been steaming right along for a couple days but now I'm stuck
> on writing a search function, could you all take a look at it and see what
> it could be, I will mark the line throwing the error in red, I did try just
> commenting out that line and searching for a record by OrderID that I know
> is there but it does not return anything , I am trying to search several
> tables in one db:

you can add some code to get more error information:

<?php
session_start();
error_reporting(E_ALL);
include("inc/dbconn_open.php");

function error_mysql($query) {
  die ("Error <b>".mysql_errno().": ".mysql_error()."</b>
        <br>SQL query: <b>".$query."</b>");
}


// ...then you can end your last line with this:

$result = mysql_query($sql) or error_mysql($sql);




hope it helps,



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux