phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] compatibility between all databases


From: address@hidden
Subject: Re: [Phpgroupware-developers] compatibility between all databases
Date: Fri, 29 Mar 2002 14:36:23 +0000

> >insert into phpgw accounts
> >(account lid, account type, account pwd,
> >account firstname, account lastname, account status,
> >account expires) values
> >('Default','g','438bf90a818801ad1fc0982c343ef11b',
> >'Default','Group','A','-1')
>
> should that '-1' really be a string value?
>

It seems to be a int.
Check phpgwapi/setup/tables_current.inc.php (line 67 for
me): it is an int, precision=4.

Is that a bug?


Anyway, I'm currently making an analyser of sql queries
and add "convert" when needed, depending on the type. My
code is quite clean and works for what I have tested. And
I detected that int and removed the quotes around the value.

When my port is done and works for me, I'll send it and
then we'll see if we keep my modifs in the *sybase*.php
files or if we change all the php files of phpgroupware.

Yves

> address@hidden (address@hidden) wrote*:
> >
> >Hi!
> >I have a problem with sybase, and solving it properly may
> >impact the whole project, so tell me if it is better to
> >just hack the sybase port (and maybe some other db ports)
> >or make a huge change in phpgroupware.
> >
> >Here is the error message I had on
> >phpgroupware/setup/setup demo.php (install the demo
accounts):
> >Warning: Sybase message: Implicit conversion from datatype
> >'VARCHAR' to 'INT' is not allowed. Use the CONVERT
> >function to run this query. (severity 16) in
>
>/opt/alt/web/html/htdocs/phpgroupware/phpgwapi/inc/class.db
sybase.inc.php
> >on line 148
> >Database error: Invalid SQL: insert into phpgw accounts
> >(account lid, account type, account pwd,
> >account firstname, account lastname, account status,
> >account expires) values
> >('Default','g','438bf90a818801ad1fc0982c343ef11b',
> >'Default','Group','A','-1')
> >
> >
> >This message means that sybase is not able to convert a
> >string to a varchar.
> >
> >Here are some ways to solve the problem:
> >- I put no varchars in the database. Only texts. That
> >makes an unoptimized use of the database. That impacts
> >only the sybase users.
> >
> >- I use regexs to use the "convert" keyword. Before that,
> >I need to read the column types to check what I have to
> >convert. This is very dirty, should be slow for sybase
> >users, and I don't even know how much stable it would be.
> >
> >- We all use a new php function, that would return the
> >argument with no change for mysql and pgsql but add some
> >stuff for sybase. That means to check all the files of
> >phpgroupware to update them.
> >
> >So what do you think? Any other idea? Any hint for sybase
> >that my DBA could not give me here?
> >
> >BTW, my work on porting phpgroupware to sybase is
> >progressing: I managed to install the applis!
> >
> >Yves
> >
> >
> >--------------
> >Profitez de l'offre spéciale Tiscali Liberty Surf !
> >50% de temps en plus pendant 3 mois sur tous les
forfaits Internet.
> >
> >http://register.libertysurf.fr/subscribe fr/signup.php3
> >
> >
> >
> >
> >Phpgroupware-developers mailing list
> >address@hidden
>
>http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
> >
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>

--
homepage - http://ymettier.free.fr                   -
gtktalog - http://www.freesoftware.fsf.org/gtktalog  -
cardpics - http://www.freesoftware.fsf.org/cardpics/ -

--------------
Profitez de l'offre spéciale Tiscali Liberty Surf !
50% de temps en plus pendant 3 mois sur tous les forfaits Internet.

http://register.libertysurf.fr/subscribe_fr/signup.php3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]