6 replies [Last post]
michels's picture
Offline
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205
Was this information Helpful?

After creating a new class and adding attributes I get the following SQL error:

user warning: 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 '.ordering FROM rts_uc_attributes AS a LEFT JOIN rts_uc_class_attributes AS ca ON' at line 1 query: SELECT a.aid, a.name, a.ordering AS default_ordering, ca.default_option, ca.required ca.ordering FROM rts_uc_attributes AS a LEFT JOIN rts_uc_class_attributes AS ca ON a.aid = ca.aid AND ca.pcid = 'testclass' WHERE a.aid = 2 ORDER BY ca.ordering in F:\www\rts\includes\database.mysql.inc on line 172.

See also the attached screenshot. This is after selecting an attribute and clicking at "Continue".
rts_ is my table prefix btw.

I don't know what to do with that...

PreviewAttachmentSize
productclasses-error.pngproductclasses-error.png11.87 KB
Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Beta 5: Product classes SQL syntax error

Missing comma after ca.required. I think it's in the dev version.

michels's picture
Offline
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205
Re: Re: Beta 5: Product classes SQL syntax error

Thx, sometimes I'm a bit blind..

merseysoft's picture
Offline
Joined: 02/20/2008
Juice: 32
Noob

Sorry im pretty much a programming virgin. How do i correct this problem?

merseysoft's picture
Offline
Joined: 02/20/2008
Juice: 32
Re: Noob

Wheres the right version? version of what?

michels's picture
Offline
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205
Re: Beta 5: Product classes SQL syntax error

Go to sites/yoursite/modules/ubercart/uc_attributes/uc_attributes.module.

Search for "ca.required ca.ordering" (should be in line 1085) and replace it with "ca.required, ca.ordering".

But be careful! After this you lost your programming-virginity Smiling

merseysoft's picture
Offline
Joined: 02/20/2008
Juice: 32
Re: Re: Beta 5: Product classes SQL syntax error

Here's the weird thing.... I have no ubercart folder in modules. I definately have ubercart in my site though the cart works perfectly. I installed drupal and ubercart together using the Ubercart Package found here:
http://www.ubercart.org/docs/user/90/installing_ubercart

Should I start again and install them seperately?
I did a site-wide search for the term "ca.required" and found nothing in any file.

*** OK now i know why... im supposed to store my custom modules in /sites/all/modules instead of /modules *** (I just read the good practices page)

Found it... fixed it Smiling

So yeah im no longer a programming virgin... I mean it hurt a little at first, but i think im starting to like it lmao!