Re: [Linux-programlama] PHP sorusu

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: mohikan (mohi_chan@yahoo.com)
Date: Wed 21 Feb 2007 - 15:53:50 EET


if kontrolünde tek eşittir değil çift eşittir kullanmalısın

$sql="select * from registered_instruments where instrumentTypeID ='$_REQUEST[instrumentTypeID]'";
if($_REQUEST['instrumentPosition']){
if($_REQUEST['instrumentPosition'] == "active" ) {
$sql1 = " and instrumentPosition = '0'";
}
elseif($_REQUEST['instrumentPosition'] == "inactive" ){
$sql1 = " and instrumentPosition = '1'";
}
$sql .= $sql1;
}

gözünden kaçmış heralde, kolay gelsin

Erdal YAZICIOGLU <erdal.yazicioglu@gmail.com> wrote: Merhabalar aşağıdaki gibi bir kodum var;
  
  $sql="select * from registered_instruments where instrumentTypeID ='$_REQUEST[instrumentTypeID]'";
if($_REQUEST['instrumentPosition']){
if($_REQUEST['instrumentPosition'] = "active" ) {
$sql1 = " and instrumentPosition = '0'";
}
elseif($_REQUEST['instrumentPosition'] = "inactive" ){
$sql1 = " and instrumentPosition = '1'";
}
$sql = $sql . $sql1;
}

?>
<A href="instruments.php?p=Type_Detailed_List&instrumentTypeID=<? echo $_REQUEST['instrumentTypeID'];?>&instrumentPosition=active">Aktif Cihazlar</A>
| <A href="instruments.php?p=Type_Detailed_List&instrumentTypeID=<? echo $_REQUEST['instrumentTypeID'];?>&instrumentPosition=inactive">Aktif Olmayan Cihazlar</A>
| <A href="instruments.php?p=Type_Detailed_List&instrumentTypeID=<? echo $_REQUEST['instrumentTypeID'];?>">Cihaz Listesi</A>
  
 Burada kullanıcı bağlantıya tıklağında aktif yada aktif olmayan cihazları görüntülesin istiyorum. Ama her seferinde bana 0 değeri döndürüyor.. Yani sorgu her seferinde select * from registered_instruments where instrumentTypeID ='5' and instrumentPosition = '0' şeklinde oluyor. Gözümden kaçan nedir?
  
 Yardımlar için şimdiden teşekkürler...
  
 Erdal

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama

 # ---------------------------------------------------------------
 # bildigim tek sey hicbirsey bilmedigim
 # The only thing I know is that I know nothing
 # ---------------------------------------------------------------
 

 
---------------------------------
8:00? 8:25? 8:40? Find a flick in no time
 with theYahoo! Search movie showtime shortcut.

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.