Am Freitag, 12. August 2005 16:02 schrieb Damon Courtney:
> >I did not want to blame you, just wanted to help you.
>
> I didn't think you were blaming. 0-] We definitely appreciate any
> and all help you can offer!
>
> >As I am using Mysql and Oracle in my projects, please let me know, if you
> > have that ready. I can help you testing, if you want.
>
> I will let you know when I have it ready. Since my company doesn't
> do any web development, it's not something that's been high on my
> priority list to do. I will see what I can work up though.
>
I want to use session_ids in the future, not right now, so its not high
priority from my side. At the moment I am just playing around a little bit.
> >Yes, the stored value in the rivet_cache database table was "0000-00-00
> >00:00:00" without a complain about an illegal syntax, as far as I know.
> >For Oracle you will need a "to_date('$now', 'YYYY-MM-DD HH24:MI:SS')", to
> > be independent from the session, in Mysql you could use a
> > "DATE_FORMAT('$now', '%Y-%m-%d %T')", to make it independent of the
> > session (in the sql statement).
> >Arnulf
>
> Hrmm... I really hate date fields in SQL. I usually go with an
> integer field and store [clock seconds]. It's more of a pain in the ass
> to me to let the SQL server try and do the work when I can just as
> easily do it myself with little-to-no loss of performance. We'll have
> to decide on the best way to handle this.
>
Just some other remarks on different syntax at least between Mysql and Oracle:
you have to think about the different syntax for outer joins for example:
Mysql:
SELECT ...
LEFT JOIN tab1 ON tab1.field1 = tab2.field2
Oracle:
SELECT ....
FROM tab1, tab2
WHERE tab1.field1(+) = tab2.field2
I think it is a hard job to make that DB independent.
At the moment my solution is:
switch $::_DB_TYPE {
mysql {
set outer_tabs "LEFT JOIN tab1 ON tab1.field1 = tab2.field2"
set outer_where ""
}
oracle {
set outer_tabs "tab1, tab2"
set outer_where "AND tab1.field1(+) = tab2.field2"
}
:
:
}
set sel_str "SELECT ... FROM .... $outer_tabs WHERE 1 = 1 $outer_where"
Arnulf
> Thanks again for the help!
>
> Damon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]