probleme mysql
#1

tcl
::mysql::sel $::mysqlink "SELECT id,id2,pseudo FROM `access` "
    if {[::mysql::result $::mysqlink rows] ne 0} {
       while {[set row [::mysql::nextresult $::mysqlink]] != ""} {
          putlog "id : [lindex $row 0]"
          putlog "id2 : [lindex $row 1]"
          putlog "pseudo : [lindex $row 2]"
       }
    }


me donne l'erreur suivante en pl


Code:
[10:22:43] <label-2> [10:23] id : 0
[10:22:43] <label-2> [10:23] id2 :
[10:22:43] <label-2> [10:23] pseudo :
[10:22:43] <label-2> [10:23] Tcl error [::user::time]: ::mysql::nextresult: no result pending
par contre ,


tcl
set res [::mysql::sel $::mysqlink "select id, id2, pseudo from access "]
   putlog "res $res"


me donne bien le nombre d'enregistrement
#2
Au lieu de ::mysql::nextresult, il vaut mieux employer ::mysql::fetch
Zeolia - Offrez-moi un café
Merci de ne pas demander d'aide en MP
Away


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Résolu] Delete mySQL Supa 5 4,797 07/11/2012, 16:25
Last Post: CrazyCat

Forum Jump:


Users browsing this thread: 1 Guest(s)