Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help With Export Database Table To CSV


Teamjr

Recommended Posts

Hello,

 

I have the below statement, but I am getting the ambiguous error from the Where statement.

 

select * into outfile '/tmp/output.csv'

FIELDS TERMINATED BY ','

OPTIONALLY ENCLOSED BY '"'

LINES TERMINATED BY '\n'

from products join image_maps_to_products;

where product_id = product_id

 

I am trying to output to csv all data fromt tables "products", and "image_maps_to_products", and field products_id is similar between both.

 

Thank you, JR

Link to comment
Share on other sites

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

select * into outfile '/tmp/output.csv'

FIELDS TERMINATED BY ','

OPTIONALLY ENCLOSED BY '"'

LINES TERMINATED BY '\n'

from products join image_maps_to_products;

where product_id = product_id

 

just so you know, you have an extra semi colon in your statement at the end of your 'from' clause (the end of the line). that might be where your problem is.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...