Author Topic: *** 1064 *** You have an error in your SQL syntax  (Read 226 times)

marvays

  • Jr. Member
  • **
  • Posts: 122
    • http://marvays.cz
  • Skype Name: marvays
*** 1064 *** You have an error in your SQL syntax
« on: October 29, 2018, 16:50:56 pm »
Hi all.
Last days I was migrate old eshop to newest. Now, when I link from menu to virtuemart "front page" have this error. This I se for first time.
Code: [Select]
*** 1064 *** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') WHERE `a`.`virtuemart_media_id` = `b`.`virtuemart_media_id`' at line 3

What is it? What i can do about it?
http://www.lukysipy.cz.hyperion.blueboard.cz/eshop

I have latest joomla and VM.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8433
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: *** 1064 *** You have an error in your SQL syntax
« Reply #1 on: October 29, 2018, 19:26:49 pm »
And I assume fine with the standard template again?  So there's your answer...

I'm afraid we are not here to fix commercial templates....
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

marvays

  • Jr. Member
  • **
  • Posts: 122
    • http://marvays.cz
  • Skype Name: marvays
Re: *** 1064 *** You have an error in your SQL syntax
« Reply #2 on: October 30, 2018, 05:35:40 am »
You think?
Here are the problems associated with Virtuemart. It does not matter whether it's a commercial extension or my attempt. I think it's good when I buy a commercial thing and I support the Virtuemart community. You produce and sell too :)

Now to the point.
Probably the problem is from /html/com_virtuemart/sublayouts/manufacturer-logo.php

Code: [Select]
<?php
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');

$product $viewData['product'];
//$currency = $viewData['currency'];
//$params = $viewData['params'];
$gridLayout = (isset($viewData['gridLayout'])) ? $viewData['gridLayout'] : '';

  $db JFactory::getDbo();
  $query $db->getQuery(true);
  $query
  ->select($db->quoteName('a.file_url'))
  ->from($db->quoteName('#__virtuemart_medias''a'))
  ->join('INNER'$db->quoteName('#__virtuemart_manufacturer_medias''b') . ' ON (' $db->quoteName('b.virtuemart_manufacturer_id') . ' = '$product->virtuemart_manufacturer_id[0].')')
  ->where($db->quoteName('a.virtuemart_media_id') . ' = '.$db->quoteName('b.virtuemart_media_id')); 
  $db->setQuery($query);
  $results $db->loadRow();
  ?>

  <div class="manufacturerLogoContainer">
  <a title="<?php echo $product->mf_name?>" class="hoverable" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' $product->virtuemart_manufacturer_id[0]); ?>"><?php echo (isset($results[0])) ? '<img src="'.JURI::root () . $results [0].'" alt="'.$product->mf_name.'" />':$product->mf_name?>
  </a>
  </div>

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8433
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: *** 1064 *** You have an error in your SQL syntax
« Reply #3 on: October 30, 2018, 12:11:07 pm »
Quote
You think?
Here are the problems associated with Virtuemart. It does not matter whether it's a commercial extension or my attempt. I think it's good when I buy a commercial thing and I support the Virtuemart community. You produce and sell too :)

But it does matter .. Flexible have sold you a product and by any measure if it has bugs or problems they must fix them...  as I do for all my extensions..

My point was this isn't your first post about display issues with this template ...  so it has to be asked, is the template fit for purpose?

It is clearly stated that we don't get involved in fixing 3rd party extensions..
http://forum.virtuemart.net/index.php?topic=108212.0

Flexible have a forum

to this issue .. there is no such file as sublayouts/manufacturer-logo.php in a std. VM install so it is Flexibles own creation

the error shows I assume that $product->virtuemart_manufacturer_id[0] doesn't exist
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

marvays

  • Jr. Member
  • **
  • Posts: 122
    • http://marvays.cz
  • Skype Name: marvays
Re: *** 1064 *** You have an error in your SQL syntax
« Reply #4 on: October 30, 2018, 12:13:46 pm »
Yes you're right.