Re: [PHP-DB] Re: Subject: union/select statement number of columns

2007-10-21 Thread David Mitchell
Good man. That' probably what he really wanted to do. On 10/21/07, Neil Smith [MVP, Digital media] [EMAIL PROTECTED] wrote: At 19:31 19/10/2007, you wrote: Message-ID: [EMAIL PROTECTED] Date: Fri, 19 Oct 2007 09:24:38 -0600 Subject: union/select statement number of columns Hello all, I

Re: [PHP-DB] union/select statement number of columns

2007-10-19 Thread David Mitchell
For starters, here's a simple example using Oracle: select tname, tabtype from tab union select table_name, null from user_tables; I replaced NULL in the second query for the missing column. In a different observation, it would be better, I think, to name the individual columns rather than

Re: [PHP-DB] Oracle TNS no listener

2007-06-07 Thread David Mitchell
Have you rebooted windows since setting the environment variable? I believe that's the only way for windows services to see the change. HTH On 6/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All I've a bit code that connects to a remote Oracle DB, does a simple query and returns the

Re: [PHP-DB] Re: Problems when trying to use ibm_db2 extension

2007-04-17 Thread David Mitchell
I'd say that on Windows, when you, or software you install, modifies the PATH environment variable, and a service, like apache, relies on a directory being in the path, you have to restart Windows in order for that service to see the new path. In other words, services get the new path only after

Re: [PHP-DB] Order By [blank]

2006-12-21 Thread David Mitchell
What about a union? Does mySql 4.0.x support it? select * from blank where tchar_10 != '' union all select * from blank where tchar_10 = '' - Dave On 12/21/06, Naintara [EMAIL PROTECTED] wrote: Depending on your MySQL version you could use a subquery by combining the two queries you

Re: [PHP-DB] Order By [blank]

2006-12-21 Thread David Mitchell
In case the blank is a null or is really a blank: select * from blank where tchar_10 is not null and tchar_10 != '' union all select * from blank where tchar_10 is null or tchar_10 = '' - Dave On 12/21/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: This is a little weird looking, but should

Re: [PHP-DB] Re: SQL Insert INTO question

2005-12-08 Thread David Mitchell
Is that a syntax supported by MySQL? That is, an INSERT with WHERE clause? I tried it against Oracle, and it doesn't work (can you imagine how upsetting it would have been to have learned that, after having worked with SQL for several years, one can do an update using an INSERT statement?). I'm