如何加载两个mysql表而不是一个(opencrypt)?

时间:2015-05-22 12:48:14

标签: php mysql

我正在使用来自OC

的“带有PHP和mySQL(BETA)的AJAX数据列表引擎”

http://www.opencrypt.com/blog.php?a=22

无法理解如何加载两个表数据?

require "data_engine.php";
$output = data_engine_select("sales_flat_quote", "reserved_order_id|customer_email|customer_firstname|customer_lastname|store_id|quote_currency_code|subtotal|entity_id", "1", "50|1", "reserved_order_id|desc", "", "", "", "", "");

这是我的代码,我不知道在何处插入数据以便加载

where sales_flat_quote.entity_id=sales_flat_order_item.quote_item_id

并从sales_flat_order_item中选择与entity_id中的quote_item_id匹配的SKU单元格并显示到另一列

function data_engine_select($ conf_table,$ conf_columns,$ conf_headers =“1”,$ conf_rows =“”,$ conf_order =“”,$ conf_edit =“0”,$ conf_query =“”,$ conf_header =“”, $ conf_footer =“”,$ conf_buttons =“”){

# table: mySQL table name
# columns: field names/mySQL colum names to display (in table), seperate with pipe delimeter, field1|field2|field4
# headers: 0 = no column names displayed, 1 = column names are displayed
# rows to display: number of rows to return, and whether to enable pages.  e.g. 20, would list 20 results.  20|1 would list 20 + other pages.  blank or 0/default is all results, and no pages (max 999999 results).
# default order = order of results, field by desc/asc.  e.g. FIELDNAME|DESC
# edit = position|type, type 0 = no, 1 = radio, 2 = checkbox. position 0 = default, on left, 1 = on right
# query = custom mySQL query.  after the WHERE.  e.g. FIELDNAME = 'keyword', the WHERE is inserted automatically, incase an AND is required
# header = places input (html or text) after header names
# footer = places input (html or text) after rows, before page links.
# button = places input (html or text) in bottom left, instead of 'Page 1 of 2' text.

0 个答案:

没有答案
相关问题