really strange mysql result

A

Alexandre Jaquet

Hi,

I can't understand why I got different result
with the same sql query.

My code :

sub getComboBox {

my $name = shift || '';
my $htmlbuffer = '';
my @members = ();
my $group = ();

(@members) = sqlSelect("clientlevel","user","userID=userID AND
clientlevel <> ''");

$htmlbuffer = "<select name=\"$name\" style=\"width: 100%\"
class=\"editionFld\" \">\n";

foreach $group(@members) {
$htmlbuffer.= "<option value=\"$group\" selected>$group</option>\n";
}
return $htmlbuffer .= "</select>\n";
}

I got only one result and when I execute the query with the console :
select clientlevel from user where userID=userID and clientlevel <> ''

I got 4 items
 
W

Walter Roberson

:I can't understand why I got different result
:with the same sql query.
:(@members) = sqlSelect("clientlevel","user","userID=userID AND
:clientlevel <> ''");

Do you really want to be passing in the literal string userID as the userID ?
Has the variable userID previously been set by the code ?
 
A

Alexandre Jaquet

Walter Roberson a écrit :
:I can't understand why I got different result
:with the same sql query.
:(@members) = sqlSelect("clientlevel","user","userID=userID AND
:clientlevel <> ''");

Do you really want to be passing in the literal string userID as the userID ?
Has the variable userID previously been set by the code ?

Nope I don't really need that, I was just been trying different form.
 
A

Alexandre Jaquet

Alexandre Jaquet a écrit :
Walter Roberson a écrit :



Nope I don't really need that, I was just been trying different form.

I'm getting headache if I debug the query who's past to the sqlSelect I
got : sql : SELECT clientlevel FROM user WHERE userID=userID AND
clientlevel <> ''

just the same :s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top