Re: [Virtuoso-users] Check if a table exists / retrieve list of tables

2007-10-05 Thread Rajeev J Sebastian
There is a "tables;" isql command for it ... perhaps thats what you want ? Regards Rajeev J Sebastian On 10/6/07, Sören Auer wrote: > Hi all, > > I spend some time today trying to figure out how I can check if there > exists a table with a certain name. For the PHP ODBC module there > exists the

[Virtuoso-users] Check if a table exists / retrieve list of tables

2007-10-05 Thread Sören Auer
Hi all, I spend some time today trying to figure out how I can check if there exists a table with a certain name. For the PHP ODBC module there exists the function odbc_tables(), which works. However, due to the problem of the PHP ODBC module with TOP queries I'm now using the pdo_odbc module, whi

Re: [Virtuoso-users] Problem with TOP queries

2007-10-05 Thread Sören Auer
I finally found a solution: the pdo_odbc driver seems to work fine :-) Quite easy solution, but it took me a while to figure that out :-( Sören

Re: [Virtuoso-users] Problem with TOP queries

2007-10-05 Thread Sören Auer
On 10/5/07, Mitko Iliev wrote: > The problem is that php open the cursor as dynamic, as a workaround can > try to set the cursor as forward only. That seems to be too complicated for me right now. I'm also wondering why TOP is even not considered if I do SELECT DISTINCT, which according to the do

Re: [Virtuoso-users] Problem with TOP queries

2007-10-05 Thread Mitko Iliev
Hi Sören, The problem is that php open the cursor as dynamic, as a workaround can try to set the cursor as forward only. We are looking for a solution. Best Regards, Mitko Sören Auer wrote: > Hi all, > > I tried the following code with both Virtuoso for Windows and Linux: > > $db=odbc_connect('v

Re: [Virtuoso-users] ENUM and SET column types

2007-10-05 Thread Sören Auer
On 10/5/07, Rumi Tsekova wrote: > You can add check constraint either in the create table statement, or add it > afterwards. > > i.e. for ex.: > > create table person ( > name varchar, > likes_fruits varchar CHECK ( likes_fruits in ('apple', 'pear','orange')) > ); Yes, but I'm not so much bothere

Re: [Virtuoso-users] ENUM and SET column types

2007-10-05 Thread Rumi Tsekova
Hi Sören, Hi all, MySQL has the neat feature of defining a table column to be a enumeration or set of a number of elements, e.g.: create table person ( name varchar, sex enum('male', 'female') ) or: create table person ( name varchar, likes_fruits set('apple', 'pear','orange') ) I gues

Re: [Virtuoso-users] Problem with TOP queries

2007-10-05 Thread Tim Haynes
Sören Auer wrote: > Hi all, > > I tried the following code with both Virtuoso for Windows and Linux: > > $db=odbc_connect('virtuoso','dba','dba'); > $result = odbc_exec($db,'SELECT TOP 3 * FROM DB.DBA.SYS_USERS'); > print_r(odbc_result_all($result)); > > However, I always get the full result set