[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    Re: [PHP] Non-Object errors (RESOLVED)
From:       "Miller, Terion" <tmiller () springfi ! gannett ! com>
Date:       2009-04-28 19:10:37
Message-ID: C61CBEDD.D13%kmiller13 () springfi ! gannett ! com
[Download RAW message or body]

Thanks folks!!


On 4/28/09 12:30 PM, "Miller, Terion" <tmiller@springfi.gannett.com> wrote:




On 4/28/09 12:27 PM, "Lex Braun" <lex.braun@gmail.com> wrote:

Terion,

On Tue, Apr 28, 2009 at 1:14 PM, Miller, Terion <tmiller@springfi.gannett.com> wrote:
Here is my code now:
   $query = "select name, age, warrant, bond, wnumber, crime FROM warrants where \
".$warranttype." = ".$warranttype." OR ".$searchname." = ".$searchname." ";    \
$result = mysql_query($query);    $row = mysql_fetch_assoc($result);    $num_results \
= mysql_num_rows ($result); Should this post of gone on the Db list maybe?

One thing I noticed about your code above has to do with your WHERE clause. Say,
$warranttype = 'warrant'
$searchname = 'Terion'

Your $query will become:
SELECT name, age, warrant, bond, wnumber, crime
FROM warrants
WHERE warrant = warrant OR Terion = Terion

The first time you use $warranttype and $searchname should be the column names rather \
than the value you would like that column to be equal to.

-- Lex

OH Ah ha bet that's it!! I hope!!





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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic