M
M
mr-zherart2014-10-26 01:18:04
Yii
mr-zherart, 2014-10-26 01:18:04

How to select from three unrelated yii tables?

Hello, you need to make a selection from 3 tables together, they are not related, and they differ in structure by half. How to implement this using criteria or cdcommand?
I tried something like this, but the selection did not work ...

$users = Yii::app()->db->createCommand()
        ->select('*')
        ->from('char_quick_donate, char_user_donate, char_anonym_donate')
        ->queryAll();

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dialog, 2014-10-26
@Dialog

What does "unrelated, and half different in structure" mean? If they are not connected, then it means to select them with three queries. I think you should read a few manual articles about SQL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question