SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 32

Thread: Searching!!!

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really did'nt want to resort to posting this up but I really did try to do it on my own....

    Basically I want to run a simple serch on the content of my database according to specific paremters how ever I keep getting an error message which says:

    "Warning: Supplied argument is not a valid MySQL result resource in C:\phpdev2\www/searchlove.php on line 25"

    The seacrh is done via a simple HTML form where users enter values into the available fields, simple enough!

    Below this the .php script which processes the vaules in the form. Please can any body tell me what is wrong with it!!


    <?php

    /*This script will perform a search of the Love_to_sing database, according to the feilds specified within the search form*/

    if ($submit == "submit")

    {

    mysql_connect("*****","****","*****");
    mysql_select_db("Database");
    mysql_query("select group_name, category, city, region from Groups
    WHERE group_name like '%$group_name%' AND category like '%$category%'
    AND city like '%$city%' AND region like '%$region%' order by group_name")

    or die ("Couldn't execute query");

    echo("Here are the results of your search!");
    }

    //Start results formatting
    echo "<TABLE BORDER=3>";

    echo "<tr><th>group_name</th><th>category</th><th>city</th><th>region</th></tr>";

    while ($row = mysql_fetch_array($result) ) {


    $group_name = $row["group_name"];
    $category = $row["category"];
    $city = $row["city"];
    $region = $row["region"];

    echo "<tr><td>$group_name</td><td>$category</td><td>$city</td><td>$region</td></tr>";

    }

    echo "</TABLE>";

    ?>



    Does Kevin cover searching databases in his article?
    I have looked through it on a number of occassions but I have not seen where he explicitly covers how to perform searches on the database. (If he has - I sincerely aplogise, and could somebody point out exactly where he has!!!)

    Thanx very much!

    Koncise.

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sometimes it just takes a pair of fresh eyes to find the bug.

    The error is on line 25 which is this:
    while ($row = mysql_fetch_array($result) )

    And it says that the supplies arguement is not a valid result set. So you've got a problem with $result.

    If you look up to your mysql_query you'll see that you forget to assign the query result!

    mysql_query("select...

    should be

    $result = mysql_query("select...

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx very much freakysid, I made the change!
    I noticed a few more errors so I made the necessary changes.

    However there is another error message, which says:

    "Parse error: parse error in C:\phpdev2\www/searchlove.php on line 14". This is pointing to my select query but I can't see an error there!

    Here is the (revised) script:


    <?php

    /*This script will perform a search of the Love_to_sing database, according to the feilds specified within the search form*/

    if ($submit == "submit")

    {

    mysql_connect("localhost","root","castor");
    mysql_select_db("Love_to_sing");
    $result = mysql_query("SELECT group_name, category, city, region from Groups
    WHERE group_name like '%$group_name%' AND category like '%$category%'
    AND city like '%$city%' AND region like '%$region%' order by group_name");
    or die ("Couldn't execute query");

    echo("Here are the results of your search!");
    }

    //Start results formatting
    echo "<TABLE BORDER=3>";

    echo "<tr><th>group_name</th><th>category</th><th>city</th><th>region</th></tr>";

    while ($row = mysql_fetch_array($result) ) {


    $group_name = $row["group_name"];
    $category = $row["category"];
    $city = $row["city"];
    $region = $row["region"];

    echo "<tr><td>$group_name</td><td>$category</td><td>$city</td><td>$region</td></tr>";

    }

    echo "</TABLE>";

    ?>


    Anything wrong in there?
    Thanx again!


    Koncise.

  4. #4
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    ... AND city like '%$city%' AND region like '%$region%' order by group_name"); 
        or die ("Couldn't execute query");
    You have two semi-colons for the one statement. Remove the ";" from "...group_name");"

    should be

    Code:
    ... AND city like '%$city%' AND region like '%$region%' order by group_name") 
        or die ("Couldn't execute query");
    Last edited by freakysid; Mar 15, 2001 at 08:53.

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I removed the semi-colon thanx.

    Now th error is saying:

    "Warning: Supplied argument is not a valid MySQL result resource in C:\phpdev2\www/searchlove.php on line 24".

    This points to where the results are formatted!!!


    Koncise!

  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That means your query is still failing for some reason. Try printing the query to the screen and then copy and paste it either to the commandline mysql program or phpMyAdmin whichever you use. Like this:

    PHP Code:
    $sql "SELECT group_name, category, city, region from Groups WHERE group_name like '%$group_name%' AND category like '%$category%' AND city like '%$city%' AND region like '%$region%' order by group_name";

    print 
    $sql;

    $result mysql_query($sql) or die ("Couldn't execute query"); 
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx, but I'm not too sure what you mean....!

    Should I do something like the following:

    <?php

    /*This script will perform a search of the Love_to_sing database, according to the feilds specified within the search form*/

    if ($submit == "submit")

    {

    mysql_connect("localhost","****","*****");
    mysql_select_db("*****");

    $sql = "SELECT group_name, category, city, region from Groups WHERE group_name like '%$group_name%' AND category like '%$category%' AND city like '%$city%' AND region like '%$region%' order by group_name";

    print $sql;

    $result = mysql_query($sql) or die ("Couldn't execute query");


    ?>


    I tried this and I got a parse error on line 19.

    Please forgive me, but I'm realy lost here! If you know if Kevin has covered this area in his tutorial, please let me know!

    Thanx,

    Koncise.

  8. #8
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it possible you left off the closing bracket for the submit clause and that is why you are getting a parse error.


    My reasoning for this approach is simple.

    If your query is failing, running the query from the mysql command line can often times give you a better reason as to why it is failing so simply printing the query to the screen with the variables all filled in will allow you to copy and paste it onto the command line and can make it easier to spot and diagnose errors. This is a global technique and not one just reserved for your situation.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  9. #9
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by freddydoesphp
    Is it possible you left off the closing bracket for the submit clause and that is why you are getting a parse error.
    I don't think the error is due to a missing bracket, I mean the above script is what I'm using at the moment, I don't see missing brackets there.


    The saga continues.....

    Thanx Freddy.


    Koncise.

  10. #10
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK Konsise, this is heading into twightlight zone teritory - the great unexplained

    Your second last post said that you get:

    "Warning: Supplied argument is not a valid MySQL result resource in C:\phpdev2\www/searchlove.php on line 24"

    freddydoesphp suggested that you should include a line

    print $sql;

    for debugging purposes to see the content of the string $sql - because your sql query is not returning a vaild result.

    So you add the innocuouse statement print $sql; and now your code doesn't get past the parser?

    There is no logical way of deducing the problem from the above. Please post the entire code again. This bug must be exterminated

  11. #11
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx a bunch Freakysid...!

    Ok, lets take it from the top:

    Here is the code to the HTML form which is used to submit the values for the .php file to process and display:


    <HTML>
    <HEAD>
    <TITLE>Advanced Search Page</TITLE>
    </HEAD>
    <BODY>

    Use the feilds to search the Love2Sing Database<p>

    <form action="searchlove.php" method="post">
    <table border=0 cellpadding=0 cellspacing=5>


    <tr>
    <td align=right>
    <p>group_name /p>
    </td>
    <td>
    <input type="text" name="group_name">
    </td>
    </tr>

    <tr>
    <td align=right>
    <p>Category /p>
    </td>
    <td>

    <p>
    <select name="category"size="1">
    <OPTION selected value="Choose a category">Choose a category</option>
    <OPTION value="Jazz" >Jazz</option>
    <option value="Rap" >Rap</option>
    <OPTION value="Barbershop" >Barbershop</option>
    <OPTION value="Choral" >Choral</option>
    <OPTION value="Classical" >Classical</option>
    <OPTION value="Blues" >Blues</option>
    <OPTION value="New age" >New age</option>
    <OPTION value="Country and Western" >Country and Western</option>
    <OPTION value="Folk" >Folk</option>
    </select>
    </td>
    </tr>


    <tr>
    <td align=right>
    <p>city /p>
    </td>
    <td>
    <input type="text" name="city">
    </td>
    </tr>


    <tr>
    <td align=right>
    <p>Region /p>
    </td>
    <td>
    <p>
    <Select name="region" size="1">
    <option selected value="Select a region">Select a region</option>
    <option value="East England (inc. London north of the Thames)
    ">East England (inc. London north of the Thames)
    </option>
    <option value="South East England (inc. London south of the Thames)
    ">South East England (inc. London south of the Thames)
    </option>
    <OPTION value="North East England
    " >North East England
    </option>
    <option value="Midlands & Mid Wales
    ">Midlands & Mid Wales
    </option>
    <option value="North West England & North Wales
    ">North West England & North Wales
    </option>
    <option value="South West England & South Wales
    ">South West England & South Wales
    </option>
    <option value="London">London</option>
    <option value="Northern Ireland">Northern Ireland</option>
    <option value="Scotland" >Scotland</option>
    </select>
    </td>
    </tr>


    <br>
    <tr>
    <td align=right colspan=5>
    <hr noshade color=black>
    </td>
    </tr>

    </table>
    <input type="submit" name="submit" value="Search!">

    </form>




    </BODY>
    </HTML>


    And here is the .phph file named "searchlove.php".

    <?php

    /*This script will perform a search of the Love_to_sing database, according to the feilds specified within the search form*/

    if ($submit == "submit")

    mysql_connect( "localhost", "****", "****") or die ("Couldn't connect to server");

    mysql_select_db("Database") or die ("Couldn't select database");

    $sql = "SELECT group_name, category, city, region from Groups WHERE group_name like '%$group_name%' AND category like '%$category%' AND city like '%$city%' AND region like '%$region%' order by group_name";

    print $sql;

    $result = mysql_query($sql) or die ("Couldn't execute query");

    ?>


    After filling the form out, I get the following:

    "SELECT group_name, category, city, region from Groups WHERE group_name like '%SEK%' AND category like '%Jazz%' AND city like '%London%' AND region like '%East England (inc. London north of the Thames) %' order by group_name"

    It looks as if the $sql SELECT query above was taken as a normal piece of text and the query did not get processed at all!

    This is current situation, thanx guys.

    Koncise.

  12. #12
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, looking at that result, it seems that the query WAS proccessed, because the values which I entered into the form were printed along with the rest of the $sql query.

    I guess this means that the query is working.


    Koncise.

  13. #13
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are a couple problems with your code that combine to create a path of execution that is not intended - so bear with me.

    1) if ($submit == "submit")

    This will evaluate to FALSE. Why, because in your code you define the submit button as having a value of "Search!"

    <input type="submit" name="submit" value="Search!">

    so you could test that the form has been submitted by using:

    if ($submit) <- will evaluate to true
    if(isset($submit)) <-will evaluate to true
    if($submit == "Search!") <- will evaluate to true

    any of those will work to find out if the form has been submitted.

    2) Missing "curly" braces
    Code:
    if ($submit == "submit") 
    
    mysql_connect( "localhost", "****", "****") or die ("Couldn't connect to server"); 
    
    mysql_select_db("Database") or die ("Couldn't select database"); 
    
    $sql = "SELECT group_name, category, city, region from Groups
    WHERE group_name like '%$group_name%' 
    AND category like '%$category%' 
    AND city like '%$city%' 
    AND region like '%$region%' order by group_name"; 
    
    print $sql; 
    
    $result = mysql_query($sql) or die ("Couldn't execute query");
    Here's the deal with the code above (which is missing the curly braces):

    if ($submit == "submit") <- evaluates to false

    mysql_connect( "localhost", "****", "****") or die ("Couldn't connect to server"); <-because the if condition is false (and there are no curly braces) this statement will *not* be executed!

    ... the remaining statements will be executed, but are going to produce major errors because mysql_connect() was not called so there is no connection to the database!

    3) Fix

    PHP Code:
    if ( isset($submit) ) 
    {
       
    mysql_connect"localhost""****""****"
          or die (
    "Couldn't connect to server"); 

       
    mysql_select_db("Database"
          or die (
    "Couldn't select database"); 

       
    $sql "SELECT group_name, category, city, region from Groups
                    WHERE group_name like '%
    $group_name%' 
                    AND category like '%
    $category%' 
                    AND city like '%
    $city%' 
                    AND region like '%
    $region%' order by group_name"

       print 
    $sql// for debugging. Remove for final release.

       
    $result mysql_query($sql) or die ("Couldn't execute query"); 

     } 
    // end if condition
    ?> 

  14. #14
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't believe this but even with all the alterations....the result of the search still shows the following:

    "SELECT group_name, category, city, region from Groups WHERE group_name like '%SEK%' AND category like '%Jazz%' AND city like '%London%' AND region like '%East England (inc. London north of the Thames) %' order by group_name"

    There must be something else wrong with the script!!

    Thanx very very much for helping me out Freakysid...

    Koncise.

  15. #15
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Konsise, what's wrong with that SQL statement? It looks rather nice to me. I'm a bit concfused that you say that the result of the search shows

    "SELECT group_name, category, city, region from Groups WHERE group_name like '%SEK%' AND category like '%Jazz%' AND city like '%London%' AND region like '%East England (inc. London north of the Thames) %' order by group_name"

    That's not the "result of the search" - that's just the content of the string $sql. The idea of printing it out is that it helps to see if you have made any mistakes in your code that cause the $sql string to be poorly formed. But (assuming all those column names are valid names in the database) the sql statement looks to be well formed.

    The code we have been working with over the last couple of posts terminates right after you call

    $result = mysql_query($sql) ...

    That is, you execute the query but do nothing with the result set!

    So, now I am confused - what happened to the code you originally had that printed out the queryy results row by row into a html table?

    PHP Code:
    //Start results formatting 
    echo "<TABLE BORDER=3>"

    echo 
    "<tr><th>group_name</th><th>category</th><th>city</th><th>region</th></tr>"

    while (
    $row mysql_fetch_array($result) ) { 


    $group_name $row["group_name"]; 
    $category $row["category"]; 
    $city $row["city"]; 
    $region $row["region"]; 

    echo 
    "<tr><td>$group_name</td><td>$category</td><td>$city</td><td>$region</td></tr>"

  16. #16
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like freakysid said, that is not the result of the query but the query that will be used. The reason like he said is to help you debug your query. So now take that string:

    SELECT group_name, category, city, region from Groups WHERE group_name like '%SEK%' AND category like '%Jazz%' AND city like '%London%' AND region like '%East England (inc. London north of the Thames) %' order by group_name


    And paste into mysql command line or phpMyAdmin and see what turns up. If you get results then another part of your script is broken, if not then you should see an error as to why your query failed. The whole point of the exercise.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  17. #17
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its clear that I had no concept of what you meant before...!

    I went away and did some checking, I pasted the query to the mySQL program and the query worked fine and the results were returned.


    Now, I'm glad to say that when I try the search, it does return the group_name of the group which was entered in the form, however the rest of the vaules (city, category and region) are not returned.

    Here is what the script looks like now:


    <?php

    /*This script will perform a search of the Love_to_sing database, according to the feilds specified within the search form*/

    if ( isset($submit) )

    {


    mysql_connect( "localhost", "****", "****")
    or die ("Couldn't connect to server");

    mysql_select_db( "Database") or die ("Couldn't select database");

    mysql_query("SELECT group_name, category, city, region from Groups WHERE group_name like '%SEK%' AND category like '%Jazz%' AND city like '%London%' AND region like '%East England (inc. London north of the Thames)%'");

    $result = mysql_query or die ("Couldn't execute query");


    //Start results formatting
    echo "<TABLE BORDER=3>";

    echo "<tr><th>group_name</th><th>category</th><th>city</th><th>region</th></tr>";

    while ($row = mysql_fetch_array($result) )


    $group_name = $row["group_name"];
    $category = $row["category"];
    $city = $row["city"];
    $region = $row["region"];

    echo "<tr><td>$group_name</td><td>$category</td><td>$city</td><td>$region</td></tr>";


    }


    ?>

    I'm not sure why the rest of the values (i.e. city, category and region) do not appear, they look fine from here, can anybody notice why this is happening?!

    Progress is being made, I'm getting there!!

    Thanx for your patience!


    Koncise.

  18. #18
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, I also get an error message which says:

    Warning: Supplied argument is not a valid MySQL result resource in C:\phpdev2\www/searchlove.php on line 25

    This points to where the results are to be formmated.


    Koncise.

  19. #19
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you need some parentheses for the while loop.

    Code:
    while ($row = mysql_fetch_array($result) )  {
    
      $group_name = $row["group_name"]; 
      $category = $row["category"]; 
      $city = $row["city"]; 
      $region = $row["region"]; 
    
      echo "<tr><td>$group_name</td><td>$category</td><td>$city</td><td>$region</td></tr>";
    }

  20. #20
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx Shane, I actually tried the script with the parentheses you pointed out but to no avail; not even the group_name was displyed as part of the result set - nothing was returned.

    Only the same error appeared:

    "Warning: Supplied argument is not a valid MySQL result resource in C:\phpdev2\www/searchlove.php on line 25."

    I don't understand what else could be wrong!!!

    Koncise.

  21. #21
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your problem mainly is in this area:

    PHP Code:
    mysql_query("SELECT group_name, category, city, region from Groups WHERE group_name like '%SEK%' AND category like '%Jazz%' AND city like '%London%' AND region like '%East England (inc. London north of the Thames)%'"); 

    $result mysql_query or die ("Couldn't execute query"); 
    You run the query but never assign the result pointer to a var and then you run a semi-version of a mysql_query on the next line, but you leasve off the () that section should look like this

    PHP Code:
    $result mysql_query("SELECT group_name, category, city, region from Groups WHERE group_name like '%SEK%' AND category like '%Jazz%' AND city like '%London%' AND region like '%East England (inc. London north of the Thames)%'") OR die (mysql_error()); 
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  22. #22
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I may just clarify that you need to impliment BOTH freedydoesphp and shane's "fixes".

  23. #23
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx guys,

    Ok, I have incorporated the 'fixes' and tired the code out.
    I'm very happy to say that no error messages appeared!!!

    However no reults were generated either! All that appears is the table borders and headings.

    I did'nt know why this was untill I noticed that I left off the $ value within the select query.

    in the above code, I had;

    category like '%category%' rather than,
    category like '%$category%'

    So I changed the values in the select query so they contained the '$' value within them, however this still failed to generate any results.

    This is the code I have now:

    <?php

    if ( isset($submit) )

    {

    mysql_connect( "localhost", "****", "****")
    or die ("Couldn't connect to server");

    mysql_select_db( "******") or die ("Couldn't select database");

    mysql_query("SELECT group_name, category, city, region from Groups
    WHERE group_name like '%$group_name%'
    AND category like '%$category%'
    AND city like '%$city%'
    AND region like '%$region%' order by group_name");

    $result = mysql_query("SELECT group_name, category, city, region from Groups
    WHERE group_name like '%$group_name%'
    AND category like '%$category%'
    AND city like '%$city%'
    AND region like '%$region%' order by group_name") OR die (mysql_error());

    //Start results formatting
    echo "<TABLE BORDER=3>";

    echo "<tr><th>group_name</th><th>category</th><th>city</th><th>region</th></tr>";

    while ($row = mysql_fetch_array($result) ) {


    $group_name = $row["group_name"];
    $category = $row["category"];
    $city = $row["city"];
    $region = $row["region"];

    echo "<tr><td>$group_name</td><td>$category</td><td>$city</td><td>$region</td></tr>";

    }

    }


    ?>

    Thanx very very much,


    Koncise.

  24. #24
    SitePoint Addict
    Join Date
    Nov 2000
    Location
    London, UK
    Posts
    223
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the reason it returned missing mysql resource is because you're missing a semicolon at the end of your SQL. Sometimes that can make it go awry. just change your mysql statement to this:
    PHP Code:
    <?
    $sql 
    "SELECT group_name, category, city, region from Groups
                                           WHERE group_name like '%
    $group_name%' 
                                           AND category like '%
    $category%' 
                                           AND city like '%
    $city%' 
                                           AND region like '%
    $region%' order by group_name;";?>
    and try that instead.

    Good Luck

    ... what's the world coming to?

  25. #25
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Location
    Location:
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx FatPiper,

    I tried the code with the semi-colon, but it made no difference; no results were returned!

    This is the longest time I've ever spent on a single piece of code! Boy I'ma be very happy once I get it sorted....

    Koncise.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •