Jamit Software Forum
Welcome, Guest. Please login or register.
July 05, 2020, 01:44:18 pm

Login with username, password and session length
Search:     Advanced search
May 27th, 2009 - Jamit Software Launches the forum today!
3,080 Posts in 791 Topics by 1,658,456 Members
Latest Member: kycyyehyhts
* Home Help Search Login Register
+  Jamit Software Forum
|-+  Jamit Job Board Customers
| |-+  User-to-User Support
| | |-+  sql error
« previous next »
Pages: [1] Print
Author Topic: sql error  (Read 15704 times)
rutulo
Jammers
Sr. Member
*
Posts: 40


« on: May 08, 2011, 12:49:38 pm »

I'm testing 3.6.10 in local (online I have 3.5), in every jobpost page I have at the end (after job description) the message error:

JB_mysql_query(SELECT t2.field_label AS FLABEL, t1.* AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translations AS t2 WHERE t1.field_id=t2.field_id AND lang='IT' AND section='1' AND form_id='1' ORDER BY field_sort ) - 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 'AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translati' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translati' at line 1

Problem is on PHP 5.3, I don't have this problem in PHP 5.2

How to solve?  Huh
thank's
Logged
wclang
Jammers
Sr. Member
*
Posts: 89


« Reply #1 on: May 08, 2011, 04:58:43 pm »

I have the same problem on all of my test boxes when its run local. Its really odd. Older versions of Jamit never had this issue.
Logged
rutulo
Jammers
Sr. Member
*
Posts: 40


« Reply #2 on: May 08, 2011, 06:23:29 pm »

I tested and problem is also with a new installation. I think problem is not full compatibility with PHP 5.3-
Someone has a solution?
Logged
Imran
Global Moderator
Hero Member
*****
Posts: 255


WWW
« Reply #3 on: May 09, 2011, 06:15:49 am »

I'm using PHP 5.3 I don't see this error, also there are few errors in php 5.2, it is better to revert to php 5.2 I will try and revert back to php 5.2.
Logged
rutulo
Jammers
Sr. Member
*
Posts: 40


« Reply #4 on: May 09, 2011, 08:17:12 am »

My problem in 5.2 is with XML export. I can export just last 1100 posts (I have 5.500...). Than I would like upgrade at 5.3-
I hope next version will be good with PHP 5.3
Logged
Imran
Global Moderator
Hero Member
*****
Posts: 255


WWW
« Reply #5 on: May 09, 2011, 08:59:02 am »

There is a new Maintenance version released today Jamit 3.6.11 you should try and upgrade your version, make sure yu follow proper upgrade procedure.
Logged
rutulo
Jammers
Sr. Member
*
Posts: 40


« Reply #6 on: May 09, 2011, 09:44:42 am »

Upgraded to 3.6.11 - but the problem is not solved  Sad
Logged
dabesa
Jammers
Full Member
*
Posts: 33


WWW
« Reply #7 on: April 07, 2012, 09:04:12 pm »

Hi guys,
I have the same error, it appear out of the blue on an installation that has work perfectly for months.
Maybe the hosting upgraded something, but the PHP is still v. 5.2.17.
Mysql server is 5.5.19, hosting is Hostgator.

The query:
        $sql = "SELECT t2.field_label AS FLABEL, t1.* AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translations AS t2 WHERE t1.field_id=t2.field_id AND lang='".JB_escape_sql($_SESSION['LANG'])."' AND section='".JB_escape_sql($section)."' AND form_id='".JB_escape_sql($form_id)."' ORDER BY field_sort  ";

is not valid and gives error.

Did anyone found a solution?

Thanks
« Last Edit: April 07, 2012, 09:12:12 pm by dabesa » Logged

dabesa
Jammers
Full Member
*
Posts: 33


WWW
« Reply #8 on: April 07, 2012, 10:09:31 pm »

Hi guys,
I have the same error, it appear out of the blue on an installation that has work perfectly for months.
Maybe the hosting upgraded something, but the PHP is still v. 5.2.17.
Mysql server is 5.5.19, hosting is Hostgator.

The query:
        $sql = "SELECT t2.field_label AS FLABEL, t1.* AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translations AS t2 WHERE t1.field_id=t2.field_id AND lang='".JB_escape_sql($_SESSION['LANG'])."' AND section='".JB_escape_sql($section)."' AND form_id='".JB_escape_sql($form_id)."' ORDER BY field_sort  ";

is not valid and gives error.

Did anyone found a solution?

Thanks


UPDATE:
I found the cause was the " t1.* AS ID" part.
I solved just removing the "AS ID" and changing the query in dynamic_forms.php to:

        $sql = "SELECT t2.field_label AS FLABEL, t1.* AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translations AS t2 WHERE t1.field_id=t2.field_id AND lang='".JB_escape_sql($_SESSION['LANG'])."' AND section='".JB_escape_sql($section)."' AND form_id='".JB_escape_sql($form_id)."' ORDER BY field_sort  ";


Everything works now, but I'm not sure if the AS ID part was used somehow, any input is appreciated.

I really think this happens after a mySql upgrade from Hostgator.

Logged

Imran
Global Moderator
Hero Member
*****
Posts: 255


WWW
« Reply #9 on: April 08, 2012, 01:53:22 am »

I'm not sure about this error, how ever removing AS ID might cause some functionality to not work, there must be other work around for this what is the exact error code and error message you got earlier?
Logged
larryokonji
Jammers
Newbie
*
Posts: 3


WWW
« Reply #10 on: April 16, 2012, 04:29:16 pm »

Hello,

Please I am having the same problem, dabesa did this solution work well for you
Or Imram do you have any other workaroud?
Logged

Imran
Global Moderator
Hero Member
*****
Posts: 255


WWW
« Reply #11 on: April 18, 2012, 08:34:12 am »

I'm also using php 5.3+ but I thankfully do not have this error.
Logged
larryokonji
Jammers
Newbie
*
Posts: 3


WWW
« Reply #12 on: April 26, 2012, 05:57:46 pm »

I had to upgrade and it worked
Used upgrade method from https://www.jamit.com.au/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=238
hope this helps
Logged

dabesa
Jammers
Full Member
*
Posts: 33


WWW
« Reply #13 on: May 09, 2012, 01:04:58 pm »

Hello,

Please I am having the same problem, dabesa did this solution work well for you
Or Imram do you have any other workaroud?

Sorry for not answering earlier!
I confirm that with the work around everything is still working.
And I checked the latest 3.6.1 code and the problem is not there anymore.

Cheers!
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.048 seconds with 17 queries.