This post was last edited by u010250831 on 2013-09-20 00:40:02
SQL as PHP MySQL
The following is an SQL statement from the Zen Cart Open source Marketplace system!
Select distinct p.products_id, P.products_image, p.products_tax_class_id, Pd.products_name,
p.products_date_added, P.products_price, P.products_type, p.master_categories_id
From ". Table_products. "P,". Table_products_description. The PD
where p.products_id = pd.products_id
and pd.language_id = ' ". (int) $_session[' languages_id '. "'
and p.products_status = 1 ". $display _limit;
Both "P" and "PD" in the above SQL statements should be aliases!
But "from". Table_products. "P,". Table_products_description. The word "PD" is not used when defining an alias. Is it not an alias? Is there any other possible usage? Ask the great God for guidance!
Reply to discussion (solution)
As can not be written.
When running SQL, directly output SQL, put in the editor to do a look at the know.
As can write not write
As to see the situation, generally can not write,
However, some environment configurations will require MySQL multi-table federated nested queries to be added as