Jump to content
ralgiere

easy Populate : error MySql 1064

Recommended Posts

Could someone PLEASE, PLEASE help me I have been trying to get Easy Populate to work for months. I have done a lot of reading and I am doing something wrong most of the time it times out or I am getting this error:

1064 - 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 '' at line 1

select vendors_name from vendors where vendors_id = 

[TEP STOP]

I included a Screenshot:

test-CSV7-28-19.csvtest-CSV7-28-19.csv

 

 

1556277837_EasyPopulate.JPG.c5754c49594ef563337ece3a93c757d7.JPG

Edited by bonbec
Title change and critical information removed for security reason

Share this post


Link to post
Share on other sites

please do not use these kind of thread titles.

Share this post


Link to post
Share on other sites

change made, thanks.


Get the latest Responsive osCommerce CE (community edition) here .

(Live   : OsC 2.2, php 5.4 & UTF-8  |  Local : Phoenix for future shop)

Share this post


Link to post
Share on other sites

Can you please post the code snippet with the sql query you seems to have modified and added vendors_name....

Then we can have a look on the syntax and try to find what's wrong.

Please take also in consideration these recomendations:

 

Share this post


Link to post
Share on other sites

Sorry It is very obvious I am not a developer or a programer and I haven't a clue of what I am doing.Could you please tell me where I can find the code snippet with the sql query you are referring to?

Share this post


Link to post
Share on other sites

First of all, if you didn't modify the code, which exact easy populate version are you using? Downoald link?

The standard version which I know does not include support for vendors. And are you using an addon called something like "vendors"?

Share this post


Link to post
Share on other sites

I had a friend that downloaded and modified the code. I am also using MVS.May be he added the Vendors

Share this post


Link to post
Share on other sites

Thank you for helping me. Please direct me to do what needs to be done. I will do what is necessary to get this working. I think 1.0 beta

Edited by ralgiere

Share this post


Link to post
Share on other sites

EP vers: 1.0 Beta
osCommerce Online Merchant v2.3
OS: Array 
HTTP: 
DB: 
PHP: Array (Zend: )
 

Share this post


Link to post
Share on other sites
31 minutes ago, ralgiere said:

I had a friend that downloaded and modified the code. I am also using MVS.May be he added the Vendors

Then you should ask your friend for help. We can't give help on code which is not standard and which has been modified to fit customized stores.

Otherwise you can post in the commercial support section to find a developer to fix this for you.

If you wants to give it a try, please open the file admin/easy populate, search for lines which contain " vendors_name" and post here the lines with this code. Include some lines before and after. We'll see if it's an easy fix.

Share this post


Link to post
Share on other sites

// find the vendor id from the name imported
                if (EP_MVS_SUPPORT == true) {
                  $vend_result = tep_db_query("SELECT vendors_id FROM ".TABLE_VENDORS." WHERE vendors_name = '". $v_vendor . "'");
                  $vend_row = tep_db_fetch_array($vend_result);
                  $v_vendor_id = $vend_row['vendors_id'];
                }
                
 if (EP_MVS_SUPPORT == true) {
                  $result2 = tep_db_query("select vendors_name from ".TABLE_VENDORS." WHERE vendors_id = " . $row['v_vendor_id']);
                  $row2 =  tep_db_fetch_array($result2);        
                  $row['v_vendor'] = $row2['vendors_name'];
                }

/*                if (MASTER_PRODUCTS_SUPPORT == true) {
                  $result2 = tep_db_query("select products_master from ".TABLE_PRODUCTS." WHERE products_id = " . $row['v_products_id']);
                  $row2 =  tep_db_fetch_array($result2);
                  $row['v_products_master'] = $row2['vendors_name'];
                }                

Share this post


Link to post
Share on other sites

Try this in the first snippet you posted:

                  $vend_result = tep_db_query("SELECT vendors_id FROM ".TABLE_VENDORS." WHERE vendors_name = ". $v_vendor);

 

Share this post


Link to post
Share on other sites

OK I will try it. Thank you so much for your time. I will let you know if it works.

Share this post


Link to post
Share on other sites

I am still getting this error:

When I click on Download Model/Price/Qty .csv file to edit in the Create then Download Files  in Quick Links. I receive this error

1064 - 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 '' at line 1

select vendors_name from vendors where vendors_id = 

[TEP STOP]

Edited by ralgiere

Share this post


Link to post
Share on other sites

Probably the variable $v_vendor is not defined. Then please ask your friend for help or post in the commercial support thread. I believe it is not possible to help here. You could also try in the official support thread, maybe someone who is also using the vendo addon can help. I never used it and can't test.

https://forums.oscommerce.com/topic/162244-easy-populate-products-attributes/?tab=comments#comment-253505

Share this post


Link to post
Share on other sites

I was so hoping you or someone could help me. I am very discouraged. I Can't ask him for help.Is there anywhere else I can get help?

Thank you,

Ray

Share this post


Link to post
Share on other sites
9 minutes ago, raiwa said:

 or post in the commercial support thread.

You could also try in the official support thread, maybe someone who is also using the vendo addon can help. I never used it and can't test.

https://forums.oscommerce.com/topic/162244-easy-populate-products-attributes/?tab=comments#comment-253505

 

Share this post


Link to post
Share on other sites

I was so hoping you or someone could help me. I am very discouraged. I Can't ask him for help.Is there anywhere else I can get help?

Thank you,

Ray

Share this post


Link to post
Share on other sites

Why Can't get help? no one want to help. I am getting the cold shoulder can someone please help me

Share this post


Link to post
Share on other sites

I did use the link he provided and posted help they kicked me out and would not let me reply

Share this post


Link to post
Share on other sites

I am very sorry to bother everyone. I just wanted help to get Easy Populate to work, so I can fix my website.

I am very disappointed.

Thank you for everyone's help.

Ray

Share this post


Link to post
Share on other sites
3 minutes ago, ralgiere said:

I am very disappointed.

Easypopulate works fine, nothing wrong with the add-on. You have added a custom field, this has probably been done wrong. If you look at file easypopulate.php in your admin directory it has full instructions on how to add a custom fields. It also clearly states that custom fields only work with

"currently only works with the "products" & "products_description" table."

Simple check replace your easypopulate.php with the original and see if it produces file without errors. If yes then look at your mofified file using instructions provided in the file annd see if the mod has been done corectly. As you can see below I have added a custom field to download the GTIN from products, it works fine.

image.png.7042ed79f5530d42954af01e4ababb02.png


 

Share this post


Link to post
Share on other sites

i tried to use the original easypopulate.php but it created problems with my MVS 

I am trying to fix the vendor code when I change the two lines below it does not work and adds two check boxes for vendor

original

$custom_fields[TABLE_PRODUCTS] = array(); // this line is used if you have no custom fields to import/export
$custom_fields[TABLE_PRODUCTS_DESCRIPTION] = array(); // this line is used if you have no custom fields to import/export

 

Changed

$custom_fields[TABLE_PRODUCTS] = array( 'vendor' => 'vendor' );

$custom_fields[TABLE_PRODUCTS_DESCRIPTION] = array( 'products_short_description' => 'vendor' );

Cam someone please help me?

Edited by ralgiere

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×