[JDEV] Re: Re: Re: Re: Re: xdb_sql
Sonic98
raymondcox at redlasertech.com
Wed Jul 23 12:16:24 CDT 2003
Ok, I will play around with the files for a min and see if I can understand
how it works and how to get it to work the way you're suggesting.
"Anton Raharja" <anton at ngoprek.org> wrote in message
news:200307231649200731.0652F2A2 at 192.168.0.6...
> actualy get it work
> my example shows how the xdb_sql part changed, play with the xml file
there and you'll understand what to do
> the important thing is, if you dont change anything on xdb_sql codes,
jabber pass to xdb_sql username at domain
> but than your script need username and domain separated, and i did that
separation by using SUBSTRING_INDEX
> do vice versa for actions like...register from web (not from jabber
client) that will send username and domain separated to jabber via xdb_sql
>
> jabber <----(username at domain)----> xdb_sql <----(username and domain)---->
db tables
>
> something likethat...
>
> *********** REPLY SEPARATOR ***********
>
> On 22/07/2003 at 20:50 Sonic98 wrote:
>
> >Are you making a suggestion or did you actually get it to work this way?
> >
> >
> >"Anton Raharja" <anton at ngoprek.org> wrote in message
> >news:200307211503440054.011D4DA3 at 192.168.0.6...
> >> keep your PHP script and db, dont change that
> >> tblPerson is on my script and now everytime jabber client register or
> >auth
> >> jabber server pass it to xdb_sql and wrote everything to my tblPerson
> >>
> >> all im trying to say is..just use same table for jabber and your script
> >but keep your script and change the jabber part
> >> use xdb_sql, try it..
> >>
> >> if anyone can do better than that, we surely do need some advice here
> >>
> >> *********** REPLY SEPARATOR ***********
> >>
> >> On 21/07/2003 at 2:17 Sonic98 wrote:
> >>
> >> >I'm not sure I'm getting you. I actually haven't played around with
> >> >xdb_sql
> >> >at all. I'm still trying to learn about it. All I know is I want to
add
> >the
> >> >PHP/Jabber webmessenger I saw on my site, and I don't the memebers in
my
> >> >site's database to have to register seperarely for the jabber server.
> >Too
> >> >bad all the jabber servers that use databases instead of files are
> >> >commercial.
> >> >
> >> >"Anton Raharja" <anton at ngoprek.org> wrote in message
> >> >news:200307210330330090.013B9B97 at 192.168.0.6...
> >> >> ok now you know that xdb_sql sent you user at domain but your PHP
script
> >> >more
> >> >> to 'user' and 'domain' separately saved
> >> >> my choice is to let PHP keep old setting and xdb_sql tricked
> >> >> heres some example of my jabber-sql.xml:
> >> >>
> >> >> <queries>
> >> >> <!-- Authentication get query (all queries have standard
> >names) -->
> >> >> <querydef name="auth-get">
> >> >> <text>SELECT PersonPassword FROM tblPerson WHERE
> >PersonUsername
> >=
> >> >> SUBSTRING_INDEX('$$username$$','@',1)</text>
> >> >> <bindvar name="user">$$username$$</bindvar>
> >> >> <bindcol name="password" offset="0"/>
> >> >> </querydef>
> >> >>
> >> >> <!-- Authentication set query -->
> >> >> <querydef name="auth-set">
> >> >> <text>UPDATE tblPerson SET PersonPassword = '$$p$$' WHERE
> >> >> PersonUsername = SUBSTRING_INDEX('$$username$$','@',1)</text>
> >> >> <bindvar name="user">$$username$$</bindvar>
> >> >> <bindvar name="password">$$p$$</bindvar>
> >> >> </querydef>
> >> >> ...
> >> >> ...
> >> >> </queries>
> >> >>
> >> >> there, when user auth xdb_sql pass user at domain replacing
$$username$$
> >but
> >> >> than SUBSTRING_INDEX makes the query only recognize 'user' part
> >> >> do some changes on xml file to suite your needs
> >
> >
> >
> >_______________________________________________
> >jdev mailing list
> >jdev at jabber.org
> >http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list