This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

fbsql help

Old posts that have not been replied to for several years.
Locked
s
svahn
Voice
Posts: 19
Joined: Sun May 19, 2002 8:00 pm
Location: Sweden
Contact:

fbsql help

Post by svahn »

Hello,

I having some trouble with the sql-tcl commands.

in PHP i write:

Code: Select all

$srlat_check = mysql_num_rows($sql_srlat_check);
how should that line look like in tcl?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

set number_of_rows [sql numrows]
Will return the number of rows returned in the last query.

Please see the manual pages and documentation for this (avilable HERE).
s
svahn
Voice
Posts: 19
Joined: Sun May 19, 2002 8:00 pm
Location: Sweden
Contact:

Post by svahn »

Yes i have looked at that site.

But i have another problem now.

when i start my eggdrop and the scripts run:

Code: Select all

set conn [sql connect ip user pass]
the bot stops responding and i cant get in to partyline, why is that?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

First off, with fbsql, you don't need to capture a socket handle or any such thing. Thus the "set conn" and the ][ can be dropped.

Second, how laggy is the connection between the bots system, and the MySQL server?

This maybe where the issue lies. Other things include issues with the version of libmysql.dll

Are yous ure this is where the bot is stopping? Have your tried putlog log lines either side of the command, to test what is and isn't taking place?
s
svahn
Voice
Posts: 19
Joined: Sun May 19, 2002 8:00 pm
Location: Sweden
Contact:

Post by svahn »

It doesnt matter now, i guess something was wrong with the eggdrop because it doesnt stop now.

I have the MySQL server and eggdrop on the same computer, so it should not lagg.

I've tried that one with putlog's.

in PHP i use 127.0.0.1 as host, use it in the tcl script too, but it doesnt work.

the line is now:

Code: Select all

sql connect 127.0.0.1 user passwd
in partyline i get:
Error 2003 (Can't connect to MySQL server on '127.0.0.1' (111))
I cant get it.. why it cant connect, it works perfectly in PHP with 127.0.0.1.
I'm out of ideas.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Could it be a user permissions issue? Your eggdrop process probably isn't running with the same UID as your web server. Also, try looking in the mysql logs for connection attempts/failures, that may provide helpful information.
s
svahn
Voice
Posts: 19
Joined: Sun May 19, 2002 8:00 pm
Location: Sweden
Contact:

Post by svahn »

Yes its something with my MySQL server, because i tried to connect to my friends MySQL server and i got that it was the wrong user and so.. but i reached the server anyway..

I couldnt find anything in the localhost.err file or did you mean any other logfile?

the user i'm trying to connect with have ALL privileges, but i dont think its a user permissions fault.

Do you think it would work if i run the mysqlserver and the eggdrop under the same user?
s
svahn
Voice
Posts: 19
Joined: Sun May 19, 2002 8:00 pm
Location: Sweden
Contact:

Post by svahn »

I know what the problem is now.

My MySQL server runs on port 3310 and the default port is 3306, and i think fbsql thinks my server has the port 3306 too.

Can i modify that somewhere?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You can easier restart the MySQL server on the correct port, or you will have to re-comoile the fbsql library, changing the source code to use the correct port.
Locked