I need a query to select this fields
name of the product
products_id
price
category
image
stock
descripton
I need a query to select this fields
name of the product
products_id
price
category
image
stock
descripton
Note to sure what you are looking for but this is a basic SQL
it would look something like this (note this will work only if the fields are in one table, if they're in diffrent tables then let me know.
select name of the product, products_id, price, category, image, stock, descripton from abc;
if all the fields are in the same table (this will list all the fields within that table. So if all the fields you listed above are in that field this is the best)then you could do this
select * from abc; (I gues what I'm saying everything in that table will be listed)
if you want to have an order then you could do this
select name of the product, products_id, price, category, image, stock, descripton from abc order by products_id desc;
nomad
This is to export to excel a file that have this fields from a zen-cart.
This fields are in the same table?
do you need to create a table in you db
or
do you want to view your fields in the db
nomad
I need to view this fiels to copy to a excel fine.
So i can integrate in a e-marketplace.
If the fields exist in that table
then you can do this
select * from abc;
abc will be your table name.
this will list all the fields within that table.
you can also do an order by which will list all the fields in order.
it migh look something like this
select * from abc order by category; (or it could be by name of the product, products_id)
Where are you going to write this SQL at.
If you have XAMMP that is were I would write it
This is only a temp SQL script
nomad
I have this query
I think that this will give me part of what i need. But now is give me timout
SELECT `products`.`products_id`,`products`.`products_image`,`products`.`products_status `, `products_description`.`products_name`, `products_to_categories`.`categories_id`
FROM products, products_description, products_to_categories
Hello,
You can't select products from products:
And you have periods in place of comasHTML Code:SELECT products_name, products_description, products_url, products_id,products_quantity, products_model, products_image,products_price,products_virtual, products_weight, products_date_added, products_last_modified, products_date_available, products_status, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, p.product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_discount_type, products_discount_type_from, products_price_sorter FROM products, product_description WHERE products_id = ''
Rich
With your query i get:
Column 'products_id' in field list is ambiguous
And i have to ad:
products_to_categories in the FROM
like this:
FROM products, products_description, products_to_categories
Iam sorry did not realize you needed product to categories,
anyway, Column 'products_id' in field list is ambiguous
this is a problem with MySql and i did not put 2 and 2 together u must place table prior to any duplicate fields to seperate from others.
Try this it should work for you:
HTML Code:SELECT products.products_id, products_type, products_quantity, products_model, products_image, products_price, products_virtual, products_date_added, products_last_modified, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_ordered, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_discount_type, products_discount_type_from, products_price_sorter, master_categories_id, products_mixed_discount_quantity, metatags_title_status, metatags_products_name_status, metatags_model_status, metatags_price_status, metatags_title_tagline_status, products_michel_cat_no, products_scott_cat_no, products_yvert_cat_no, products_sg_cat_no, products_type_logo, products_type_logo2, products_type_logo3, products_item_no, item_year, item_fault, cancel_country_send, cancel_country_receive, cancel_town_send, cancel_town_receive, item_type, storage_loc, cancel_date_send, logo_id, products_description.products_id, language_id, products_name, products_description, products_url, products_viewed, products_to_categories.products_id, categories_id FROM products, products_description, products_to_categories