On Sat, Aug 10, 2013 at 11:31 AM, Taba Taba <betak...@gmail.com> wrote:
> Thank you so much. Another question:
>
> $this->select("col1");
> if(1 > 0) {
>     $this->select("col2, col3");
> }
> $this->from("tbl")->where("1 = 1");
> if( 2 > 1) {
>     $this->where("2 > 1");
> }
> $this->left_outer_join("tbl2", "tbl2.t_id = tbl.id");
> // output: SELECT col1, col2, col3
> // FROM tbl
> // LEFT OUTER JOIN tbl2
> //     ON tbl2.t_id = tbl.id
> // WHERE 1=1 AND 2 > 1
>
> On sqlalchemy?
>
> s = select(["col1"])
> if 1 > 0:
>     s.append_column("col2, col3")
> s.from("tbl") # not found from(...) in sqlalchemy.sql.expression.Select or
> _SelectBase
> s.where("1 = 1")
> if 2 > 1:
>     s.where("2 > 1")
> s.outerjoin("tbl2", "tbl2.t_id = tbl.id") # not works
> print s
>
> Thank you in advance!


Where's the question?

I think your problem, though, is that you didn't read the tutorial[0].
Or if you did, not carefully enough.

[0] http://docs.sqlalchemy.org/en/rel_0_8/core/tutorial.html#selecting

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to