egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

libmysql Select Problem [German]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Northeim
Voice


Joined: 19 Feb 2006
Posts: 3

PostPosted: Sun Feb 19, 2006 9:29 am    Post subject: libmysql Select Problem [German] Reply with quote

Hi,

ich möchte mir etwas aus einer MySQL 5 Datenbank ausgeben lassen.

set test [mysqlsel $mysql_handler "SELECT * FROM $sql_table WHERE 'Spalte1' LIKE '%test%'"]
putmsg $nick $test

Er soll mir also alles anzeigen was "*tes*t" beinhaltet.
Jedoch kommt als Antwort immer nur "".Also nichts

Verbunden mit der Datenbank bin ich jedoch da
set sql_entrys [mysqlsel $mysql_handler "SELECT count(*) FROM $sql_table" -list]
mir die richtige Anzahl der Zeilen ausgibt.

Ich nutze libmysqltcl3.01.so
Finde nirgends den Fehler, da wenn ich die Befehl mittels phpMySQlAdmin direkt in die Datenbank eingeben, auch die richtige Ausgabe erhalte

mnfG
Northeim
Back to top
View user's profile Send private message
Northeim
Voice


Joined: 19 Feb 2006
Posts: 3

PostPosted: Mon Feb 20, 2006 4:53 am    Post subject: Reply with quote

Habe den Fehler gefunden,jedoch kommt das nächste Problem:

set jo 'text'
set test [mysqlsel $mysql_handler "SELECT * FROM $sql_table WHERE 'Spalte1' LIKE $jo"]
if { $test == 0 } {
putserv "PRIVMSG $chan : \[ CHECK \] $jo was not found in database."


Er soll mir also sagen, ob in Spalte1 ein Eintrag $jo vorhanden ist.
Jedoch bekomme ich immer den Wert zurück obwohl es einen Eintrag mit dem Text gibt.
Mittels phpmyadmin und selben Befehel zeigt er mir den Eintrag an.

mfG
Northeim
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber