Well when I log the query I get : 20020923T11:21:34: [alert] (xdb_sql_backend.c:92): the query is: UPDATE users SET password = 'azerty' WHERE jid = '[EMAIL PROTECTED]'
The query is right, if I copy/paste it to MySQL (thru phpMyAdmin for example), it does work perfectly... But it still puts a "NULL" value to the password... :/ -------------------------------- Bruce Heller Ligne Directe: 01.47.66.55.64 Fax: 01.47.66.55.54 Standard: 01.47.66.55.50 -------------------------------- TERRA VIRTUAL 73, rue de Saussure 75017 PARIS ------------------------------- ----- Original Message ----- From: "raditha dissanayake" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, September 21, 2002 11:41 PM Subject: Re: [JDEV] Changing database structure in xdb_sql > certainly does not look as if there is an error in your xml > what you can do is to add something like this > > <code> > log_error(ZONE,"the query is: %s",query); > </code> > > to your sqldb_query() function in xdb_sql_backend.c that will tell you > what is the exact query that is being passed to the databse. > > As for your second question you will be better off using a database that > supports stored procedures rather than trying to use two separate queries. > > > Justin Georgeson wrote: > > > You created your database with jid instead of username, right? Did you > > create it manually or edit one of the sample configs and create off that? > > > > Bruce Heller wrote: > > > >> Hello. I wanted to use a slighty different database architecture with > >> xdb_sql, I modified the xdb_sql.xml according to the new layout of the > >> tables. But it doesn't work as it should. > >> For example the password changing was : > >> <!-- Authentication set query --> > >> <querydef name="auth-set"> > >> <text>UPDATE users SET password = '$$p$$' WHERE username = > >> '$$username$$'</text> > >> <bindvar name="user">$$username$$</bindvar> > >> <bindvar name="password">$$p$$</bindvar> > >> </querydef> > >> > >> And is now : > >> <!-- Authentication set query --> > >> <querydef name="auth-set"> > >> <text>UPDATE users SET password = '$$p$$' WHERE jid = > >> '$$username$$'</text> > >> <bindvar name="user">$$username$$</bindvar> > >> <bindvar name="password">$$p$$</bindvar> > >> </querydef> > >> > >> The only change here is that the username is now called "jid" in the > >> database... But it won't change the password right, it onyl returns > >> "NULL" > >> into the database... > >> > >> Also, I would like to know if it's possible to excecute 2 SQL query > >> for a > >> single querydef ? > >> > >> Thanks in advance ! > >> > >> -------------------------------- > >> Bruce Heller > >> Ligne Directe: 01.47.66.55.64 > >> Fax: 01.47.66.55.54 > >> Standard: 01.47.66.55.50 > >> -------------------------------- > >> TERRA VIRTUAL > >> 73, rue de Saussure > >> 75017 PARIS > >> ------------------------------- > >> > >> _______________________________________________ > >> jdev mailing list > >> [EMAIL PROTECTED] > >> http://mailman.jabber.org/listinfo/jdev > > > > > > > _______________________________________________ > jdev mailing list > [EMAIL PROTECTED] > http://mailman.jabber.org/listinfo/jdev _______________________________________________ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
