Demo mode with Favourites.

By Toledoh - April 11, 2010

Hi Guys,

When I have members and favourites plugins on my demo site, I get the following error:

MySQL Error: 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 '(demo1271044932-195)__website_favorites WHERE tableOrTag = 'j_product_catalogue'' at line 3


Have I done something wrong, or is this a bug? It seems to work fine when I change demoMode = 0, but as demoMode = 1 I get the error.

The demo site is at http://www.forrest.id.au/nutsnbolts/, the favourites is on the catalogue page.
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Demo mode with Favourites.

By Jason - April 12, 2010

Hi,

Would you be able to post the file catalogue.php so I can take a look at that.
Do you experience the problem anywhere else, or only there?

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Toledoh] Demo mode with Favourites.

By Jason - April 13, 2010

Hi,

Okay, I'll take a look. If you could send the FTP and CMS details that would be great. Just email them to jason@interactivetools.com, don't post them in the forum.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Toledoh] Demo mode with Favourites.

By Jason - April 14, 2010

Hi,

Since the table_prefix for demo mode contains brackets, we just had to add back tics (`) around the entire table name:
$favoriteNumsQuery = "SELECT recordNum FROM `{$TABLE_PREFIX}_website_favorites` WHERE tableOrTag = '$tableOrTag' AND createdByUserNum = '$currentUserNum'";

This code will now work both in and out of demo mode.

Let me know if you run into any other issues.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/