Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
I created a nav bar for registered users that will display a few categories at time

like what I describe
HERE

but when I am looking at any category and in a forum. and type in the forum search box
I get the following sql error.

SQL ERROR: Wed, Mar 10 2004 10:17:38 -0800 Unable to do_query: SELECT t1.B_Number,t1.B_Main,t3.U_Username,t1.B_Subject,t1.B_Posted,t1.B_Board,t3.U_Color,t1.B_Reged,t1.B_Icon,t1.B_Posterid,t1.B_Status,t1.B_AnonName,t1.B_Body FROM w3t_Posts AS t1, w3t_Users AS t3 WHERE t1.B_Approved = 'yes' AND t1.B_Posterid = t3.U_Number AND t1.B_Status <> 'M' AND t1.B_Board IN ('solutions') AND (Bo_Cat = 1 ) AND ( (t1.B_Subject LIKE '%calendar%' OR t1.B_Body LIKE '%calendar%')) ORDER BY B_Posted DESC LIMIT 26
Unknown column 'Bo_Cat' in 'where clause'
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fmforums/public_html/threads/mysql.inc.php on line 160

Sponsored Links
Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
ok I tried it here on ThreadsDev And don't get the error. Where would I begin to look to try and fix the error I get?

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I don't see the w3t_Boards indluded in the FROM statement.

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
Scrounger, forgive me but that flew over my head. I have not modified any of the Search functions. I only added the category number in the url and it will break the search. Where or what file should I start poking around in and what should I look for and what should I add / or modify?

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Talk about Deja Vu. I am sure I replied to a similar post...

Yes scroungr is right the w3t_Boards table is not included in the FROM statement hence the query fails because the Bo_Cat column is in that table.

I checked the search.php file which is on my site as well and it doesn't have that table included. This is strange because I upgraded my forum this week so my copy of the forum software is really fresh...


Nikos
Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
well to tell ya the truth I am really not sure where that query is coded but since it's in the footer of the postlist.php page It would probably be in the postlist.php I would ask Josh or Scream for certain.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Actually I run it against my forum and it works perfectly with no error. Oceanwest please have a look at your source files (recent download) with the ones in the live environment. The file you should be looking at is dosearch.php. It appears that the $catonly variable is not initialized properly and it carries something from a previous if statement.


Nikos
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
hmmmm so maybe ya need to unset catonly? hmm thats strange and if no mods done to there I would definitly report this..

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Actually it's a bug in 6.4.1:

http://www.ubbcentral.com/boards/showflat.php?Cat=&Board=UBB5&Number=35881

You can't do searches with the Cat= variable in the URL as the Boards table was removed from it.

I know it's fixed in 6.5. Currently it's not fixed in 6.4.2, but I just reported it there. Not sure if a fix is possible there or not.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
I spoke to Josh and he pointed this report in UBB Central

http://www.ubbcentral.com/boards/showflat.php?Cat=&Board=UBB5&Number=35881


Nikos
Sponsored Links
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Doh! You are too fast for me dude. I guess I am getting old


Nikos
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Yeah come on 6.5 fix me some errors!

Joined: Mar 2003
Posts: 19
Newbie
Newbie
Offline
Joined: Mar 2003
Posts: 19
Bummer that they didn't fix the problem with 6.4.2 either... oh well... just have to be patient I guess...

-bob

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, it was marked as fixed for 6.4.2 - yet doesn't seem to be.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Actually this is kinda fixed in 6.4.2 - but dosearch.php is missing from the changedfiles.txt file. Upload the new copy of dosearch.php and you won't have any MySQL errors. There is still the option to search all forums, which isn't quite right, but it's better than it being broken.

Joined: Mar 2003
Posts: 19
Newbie
Newbie
Offline
Joined: Mar 2003
Posts: 19
You continue to amaze with your threads expertise and your infinite patience with bozos like me stumbling in here everytime some hiccup happens on my forum...

Thanks a ton! I appreciate it.

-bob
www.vintage-mustang.com

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
No problem-o.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,153
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 464
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 13
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)