Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Senior Member/Coder Rupert Avery's Avatar
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    157

    Default Category search brings up error

    Hey, on my site if you select a category from the drop down menu and then search for something it brings up this error

    19-03-2012, 16:29:36:: Database access error. Please contact the site administrator. SELECT * FROM webid_auctions WHERE
    (title LIKE '%race change%' OR id = 0)
    AND (category IN (198,1205,1016,860,862,861,746,745,626,625,455,229 ,228,227,1066,1065,1064,226,225,224,223,1203,1202, 1201,1200,1199,222,893,892,891,890,221,526,525,524 ,523,522,521,520,220,1123,984,983,777,674,673,672, 219,1219,1017,986,985,473,472,471,218,217,216,215, 214) OR secondcat IN (198,1205,1016,860,862,861,746,745,626,625,455,229 ,228,227,1066,1065,1064,226,225,224,223,1203,1202, 1201,1200,1199,222,893,892,891,890,221,526,525,524 ,523,522,521,520,220,1123,984,983,777,674,673,672, 219,1219,1017,986,985,473,472,471,218,217,216,215, 214)
    AND closed = 0 AND suspended = 0 AND starts <= 1332174576 AND ends > 1332174576
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
    page:/search.php line:71
    wondering if anyone can help
    www.ultima-auctions.com powered by webid

  2. #2
    Senior Member/Coder Rupert Avery's Avatar
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    157

    Default

    this is fixed thank you!
    www.ultima-auctions.com powered by webid

  3. #3

    Default

    Quote Originally Posted by Rupert Avery View Post
    this is fixed thank you!
    hi I have the same problem what is the fix please?

  4. #4
    Senior Member/Coder Rupert Avery's Avatar
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    157

    Default

    Let me find the fix, ONe of the guys here told me
    www.ultima-auctions.com powered by webid

  5. #5

    Default

    Quote Originally Posted by Rupert Avery View Post
    Let me find the fix, ONe of the guys here told me
    great thanks

  6. #6
    Senior Member/Coder Rupert Avery's Avatar
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    157

    Default

    I cant find it.. trying to find all the people i talked to on the two dates but just cant figure it out :S
    www.ultima-auctions.com powered by webid

  7. #7
    Senior Member/Coder Rupert Avery's Avatar
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    157

    Default

    okay I have compared a new and old file and found only one difference.

    In search.php find this
    Code:
    $catalist = '(';
    		$catalist .= implode(',', $childarray);
    		$catalist .= ')';
    		$catSQL = " AND (category IN " . $catalist;
    		if ($system->SETTINGS['extra_cat'] == 'y')
    		{
    			$catSQL .= " OR secondcat IN " . $catalist;
    		}
    then add the Red text

    Code:
    $catalist = '(';
    		$catalist .= implode(',', $childarray);
    		$catalist .= ')';
    		$catSQL = " AND (category IN " . $catalist . ")";
    		if ($system->SETTINGS['extra_cat'] == 'y')
    		{
    			$catSQL .= " OR secondcat IN " . $catalist;
    		}
    It should be about link 51... I think this is what was missing....
    www.ultima-auctions.com powered by webid
    1 out of 1 members found this post helpful.

  8. #8

    Default

    damn lol need this dont wanna have to work it out myself

  9. #9

    Default

    Quote Originally Posted by Rupert Avery View Post
    okay I have compared a new and old file and found only one difference.

    In search.php find this
    Code:
    $catalist = '(';
    		$catalist .= implode(',', $childarray);
    		$catalist .= ')';
    		$catSQL = " AND (category IN " . $catalist;
    		if ($system->SETTINGS['extra_cat'] == 'y')
    		{
    			$catSQL .= " OR secondcat IN " . $catalist;
    		}
    then add the Red text

    Code:
    $catalist = '(';
    		$catalist .= implode(',', $childarray);
    		$catalist .= ')';
    		$catSQL = " AND (category IN " . $catalist . ")";
    		if ($system->SETTINGS['extra_cat'] == 'y')
    		{
    			$catSQL .= " OR secondcat IN " . $catalist;
    		}
    It should be about link 51... I think this is what was missing....


    Thanks heaps seems to work now
    1 out of 1 members found this post helpful.

  10. #10
    Senior Member/Coder Rupert Avery's Avatar
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    157

    Default

    NP I really cant remember who helped me! another problem I got help with was the "hot Items" code? did you get yours sorted?
    www.ultima-auctions.com powered by webid

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
  •