-1

I'm having real problems trying to do an inner join through medoo. Looking at all the resources I can find, there shouldn't be anything wrong with the code below, but it's just coming blank. It's not throwing any errors either.

"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]

If I change it to the following, I get the full output of "wp_ch_station" as I'd expect.

$table_prefix . "ch_station",
["id", "name", "status", "time"],
["id[!]" => $client_id]
Badger
  • 467
  • 4
  • 17
  • It looks like it's outputting the period between quotes. Debugging the sql shows it's outputting `"wp_ch_station"."name"` – Badger Oct 23 '17 at 11:33

1 Answers1

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...

nitrex
  • 522
  • 6
  • 16