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.

Search found 5 matches

by MUSUL
Wed Apr 28, 2010 1:54 pm
Forum: Scripting Help
Topic: Count msyql output
Replies: 6
Views: 4004

ok ty, working with mysql::result. Now i have another doubt.

Using rand function like this:

set n [rand 5]

what's the range for the rand? 1-5? 1-4?
by MUSUL
Wed Apr 28, 2010 1:21 pm
Forum: Scripting Help
Topic: Count msyql output
Replies: 6
Views: 4004

Count msyql output

Hello,

How can count all the results from a sql query? Im trying this:

Code: Select all

set sql "SELECT id FROM news"
	set query [mysql::query $db_handle $sql]
	
	if {[set row [mysqlnext $query]] != ""} { incr n 1 }
	
	putquick "PRIVMSG #test:$n news registered."
by MUSUL
Mon Apr 26, 2010 5:34 pm
Forum: Scripting Help
Topic: [SOLVED] mysql connection
Replies: 4
Views: 3125

Omg was using a local mysql account. Now i can :D ty!

I thought that @ip was for the server :p
by MUSUL
Mon Apr 26, 2010 5:00 pm
Forum: Scripting Help
Topic: [SOLVED] mysql connection
Replies: 4
Views: 3125

No, myhost.com is resolving with 84.*.*.*. 208.*.*.* is the IP from my private shell.

So, i wanna connect to myhost.com (external IP), and eggdrop is trying to connect to the shell's IP.
by MUSUL
Mon Apr 26, 2010 4:07 pm
Forum: Scripting Help
Topic: [SOLVED] mysql connection
Replies: 4
Views: 3125

[SOLVED] mysql connection

Hello i have a big problem, I try this: set db(host) "myhost.com" set db(id) "user" set db(pass) "******" set db(dbase) "bot" package require mysqltcl set db(conex) [::mysql::connect -host $db(host) -port "3306" -user $db(id) -password $db(pass) -db ...