使用Medoo

时间:2017-10-23 10:19:43

标签: php mysql medoo

我在尝试通过medoo进行内部联接时遇到了实际问题。看看我能找到的所有资源,下面的代码应该没有任何问题,但它只是空白。它也没有抛出任何错误。

"wp_ch_station",
["[><]wp_ch_statuses" => ["wp_ch_station.status" => "wp_ch_statuses.id"]],
["wp_ch_station.id", "wp_ch_station.name", "wp_ch_statuses.status", "wp_ch_station.time"],
["id[!]" => $client_id]

如果我将其更改为以下内容,我会得到“wp_ch_station”的完整输出。

$table_prefix . "ch_station",
["id", "name", "status", "time"],
["id[!]" => $client_id]

1 个答案:

答案 0 :(得分:1)

You can always use query instead of select using Medoo framework for complex queries.

   $db->query('select a.c1,a.c2,b.c1,b.c2 from a inner join b on a.x=b.x where date<subdate(CURRENT_DATE,1)')->fetchAll();

sometimes it's easier to write queries...