Jump to content


Photo

php mysql dtatabase listing help


  • This topic is locked This topic is locked
No replies to this topic

#1 snake310

snake310
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 21 August 2006 - 09:43 AM

Hello

this listing works fine , the only thing is that i dont want to list the same named thing twice, any1 has any idea

if(!$get2)
echo "<option>step 3</option>";
$a=z;
$id_tab=mysql_list_fields($get1,$get2,$id);
$nr_col=mysql_num_fields($id_tab);
@mysql_select_db($get1);
$inter="SELECT model FROM $get2";
$id_rez=mysql_query($inter);
$row=mysql_num_rows($id_rez);
while($rand=mysql_fetch_row($id_rez))
for($i=0;$i<$row;$i++){
for($n=$i;$n=0;$n--)
if($rand[$i]=$rand[$n-1])
$a=$i;
if($i!==$a)
if($rand[$i]!=NULL)
echo "<option>".$rand[$i]."</option>"; }

if($_GET['list3']=NULL)
echo "<option selected>Please Select</option>";
else
echo "<option selected>".$get3."</option>";
?>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users