1
fredski
SQL Syntax error for the Berkley Tabs
  • 2004/8/23 8:55

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


I get the following error when I turn Debug on.

select * from xoops_tb_tabs order by parent_id , tb_ord Desc
select * from xoops_tb_tabs where parent_id=1 order by tb_ord DESC
select parent_id from xoops_tb_tabs where id=1 order by tb_ord DESC
select * from xoops_tb_tabs where parent_id=0 order by tb_ord DESC
select parent_id from xoops_tb_tabs where id=0 order by tb_ord DESC
select * from xoops_tb_tabs where parent_id= order by tb_ord DESC
Error number: 1064
Error message: 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 'order by tb_ord DESC' at line 1

Has anyone had this problem and sorted it out, or does anyone understand that error and know how I can fix it???

Speed.. Have you come accross this in your TAB theme??

2
Dave_L
Re: SQL Syntax error for the Berkley Tabs
  • 2004/8/23 10:18

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


select from xoops_tb_tabs where [color=ff0000]parent_id=[/colororder by tb_ord DESC


The problem is that there's no value provided for parent_id. The way to fix it would be to locate the code that generates that query, and figure out why the value is missing. I'm not familiar with "Berkley Tabs", so I can't provide additional help.

3
fredski
Re: SQL Syntax error for the Berkley Tabs
  • 2004/8/23 12:56

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


I have no idea where to find the problem or where to start looking for the code that generates it.

here is the zipped tabs module that I'm using,

Please take a look and see if you can see the problem.

Help would be much appreciated

Thanx

4
Dave_L
Re: SQL Syntax error for the Berkley Tabs
  • 2004/8/23 15:21

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I took a quick look at it. That query is in show_menu.php, function get_child_menu. It's not obvious to me what's causing the problem or how to fix it. I'd have to install the module and play around with it, and I don't have time for that right now.

5
fredski
Re: SQL Syntax error for the Berkley Tabs
  • 2004/8/24 7:34

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


Thanx for having a look anyway Dave, I hope that now you've pointed out where the problem is, someone else might be able to quickly find a fix for it and let me know.

6
Dave_L
Re: SQL Syntax error for the Berkley Tabs
  • 2004/8/24 10:47

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


By the way, putting quotes around the value should suppress that MySQL syntax error, but may only mask (not fix) an underlying error.

$quer="select * from $table where parent_id=[color=ff0000]'$pid'[/color]";

Login

Who's Online

242 user(s) are online (134 user(s) are browsing Support Forums)


Members: 0


Guests: 242


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits