close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

You have an error in your SQL syntax

Thread began 11/24/2014 7:27 am by sabastian130416448 | Last modified 11/25/2014 12:53 pm by Jason Byrnes | 370 views | 4 replies |

sabastian130416448

You have an error in your SQL syntax

Hi.

I am trying to set up Dataassist Sort with one of my pages. Everything seemed to be going well then I got this error suddenly;

(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 'name_tb' at line 1)

I have added the page and hope some one can find the problem because I am not able to.

Thanks

(Update)

Something is very strange, I am using Firefox 29.0.1, and every now and then when I clear my history (testing my site on the local server) I get the ou have an error in your SQL syntax error but then a couple of minutes later, without doing any thing to my pages, the page suddenly starts working correctly and there is no errors.

I uploaded the test page to my website and there I also get the same error.

Was able to re-create the error.

1: I select either name or price to sort my columns.
2: I then cleared my history.
3: Removed the ?sort=name_tb in the URL.
4: Pressed enter and wham, the error comes up.

If I add the ?sort=name_tb after getting the error my page shows normally once again. If on my website I enter all-tiger-nut-related-products-Results1.php?sort=price_tb instead of all-tiger-nut-related-products-Results1.php the page displays. I can then remove the ?sort=price_tb and the page displays normally. I have no clue what could cause this problem.

Attached Files
all-tiger-nut-related-products-Results1.rar
Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

sabastian130416448

See private msg.

Sign in to reply to this post

sabastian130416448

Hi Jason.

I found the problem.

I had my code as:

$WADA_Sort_1 = new WADA_SortObject();
$WADA_Sort_1->DefaultSort = "name_tb";
$WADA_Sort_1->ColumnList = "".((isset($_GET["sort"]))?$_GET["sort"]:"") ."";
$WADA_Sort_1->SortOrderList = "Ascending";
$WADA_Sort_1->ToggleOn = false;


Then changed ($WADA_Sort_1->DefaultSort) to

$WADA_Sort_1 = new WADA_SortObject();
$WADA_Sort_1->DefaultSort = "ORDER BY name_tb ASC";
$WADA_Sort_1->ColumnList = "".((isset($_GET["sort"]))?$_GET["sort"]:"") ."";
$WADA_Sort_1->SortOrderList = "Ascending";
$WADA_Sort_1->ToggleOn = false;

Now it seems to be working. Did I do it correctly or not? Don't want any problems later on.

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that is correct for the default sort.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...