Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2005, 02:24 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Dropdown box

I am trying to build a dropdown box from mysql values. I basically duplicated some working code. But why would that one telling me

PHP Code:
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /var/www 

PHP Code:
 $getgroup = mysql_query(" 
SELECT DISTINCT group FROM ".$_CONF['tprefix']."teams ORDER BY group
");
$result_getgroup = mysql_query("$getgroup");
$total_groups = mysql_numrows($result_getgroup);
$g=0;
$myselect = "
<select name=\"group\">
";
while($g < $total_groups) {
$myselect .= "
<option value=\"".mysql_result($result_getgroup,$g,"group")."\">"
.mysql_result($result_getgroup,$g,"group").
"</option>
";
                $g++;
}
 
$myselect .= "
</select>
"; 
Reply With Quote
  #2  
Old 12-22-2005, 06:11 PM
soulfly soulfly is offline
 
Join Date: Dec 2005
Location: Germany
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

type 'mysql_num_rows' instead of 'mysql_numrows' !
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:59 PM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.