Re: [LINUX:8994] Re: php3

---------

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

Subject: Re: [LINUX:8994] Re: php3
From: Sait Karalar (k-sait@hitit.bimel.com.tr)
Date: Sun 19 Sep 1999 - 13:33:18 EET DST


Aynisi PHP ve PgSQL ile:

if (!$conn=pg_Connect("dbname=??? user=??? password=???)) {
        echo "Error Conn":
        exit;
}
if (!$n = pg_Exec("SELECT DISTINCT alan_adi FROM table_adi")) {
        echo "error select";
        pg_Close($conn);
        exit;
}
$nr = pg_NumRows($n);
echo "<select name=thisname>";
        for ($i=0; $i<$nr; $i++) {
                $temp = pg_Result($n,$i,"alan_adi");
                echo "<option value=\"$temp\">$temp";
        }

echo "</select>

seklinde yapabilirsin.

eger JavaScript icinde ComboBox olayinda farkli bir islem var ise;
        [ bilmiyorum ]
O zaman butun SCRIPT i PHP ile bastirir. yukardaki <option kisimlarinda
ona gore duzenleyebilirsiniz..

iyi calismalar.

On Sat, 18 Sep 1999, Murat Kasikcioglu wrote:
> soyledigim de o idi. eger
>
> <html>
> ...
> <body>
> ...
> <select name=x >
> <!-- burada php ile database'deki bilgiyi bir cursor'a atip bir dongu
> kurabilirsin. -->
> </select>
> </body>
> </html>
>
>
> pl/sql'de soyle yazdim, belki bir fikir verebilir (php bilgim yok!):
>
> procedure aaaa
> is
> v_row consultant%ROWTYPE;
> cursor mycr is select * from consultant order by consultant_name;
> begin
> htp.print('<SELECT NAME="consultant" SIZE="1">');
> open mycr;
> loop
> fetch mycr into v_row;
> exit when mycr%NOTFOUND;
> htp.print('<OPTION
> VALUE='||v_row.consultant_id||'>'||v_row.consultant_name);
> end loop;
> close mycr;
> htp.print('</SELECT>');
> end;
>
>
>
> Murats@turktraktor.com.tr wrote:
>
> > Hayır veritabanındaki verileri bir combo box icine yazdırmak. Bir loop
> > içinde her kayıt için veri girmek yerine sql ile veri tabanından dinamik bir
> > şekilde çağırmak istiyorum.
> > <<...>>
> > Everybody is free to feel good
> >
> > -----Original Message-----
> > From: Mustafa Selcuk SARAC [SMTP:selcuk@roots.gen.tr]
> > Sent: 17 Eylül 1999 Cuma 06:23
> > To: Multiple recipients of list LINUX
> > Subject: [LINUX:8964] Re: php3
> >
> > This message uses a character set that is not supported by
> > the Internet Service. To view the original message content, open the
> > attached message. If the text doesn't display correctly, save the attachment
> > to disk, and then open it using a viewer that can display the original
> > character set. << File: message.txt >>
> >
> > Listeden cikmak icin:
> > unsub linux
> > mesajini listeci@bilkent.edu.tr'a gonderiniz.
> > Lutfen Listeci icin MIME / HTML / Turkce Aksan kullanmayin.
> > Liste arsivinin adresi: http://listweb.bilkent.edu.tr/
>
> --
> Murat Kasikcioglu
> Innova Consulting Company
> muratk@innovaconsulting.com
>
>
>
> Listeden cikmak icin:
> unsub linux
> mesajini listeci@bilkent.edu.tr'a gonderiniz.
> Lutfen Listeci icin MIME / HTML / Turkce Aksan kullanmayin.
> Liste arsivinin adresi: http://listweb.bilkent.edu.tr/
>

---------------------
- ~ Sait Karalar \
- Bimel LTD, Ankara |----> http://www.bimel.com.tr/~sait/
- Network Group /
---------------------

 
 Listeden cikmak icin:
          unsub linux
 mesajini listeci@bilkent.edu.tr'a gonderiniz.
   Lutfen Listeci icin MIME / HTML / Turkce Aksan kullanmayin.
  Liste arsivinin adresi: http://listweb.bilkent.edu.tr/


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

---------

Bu arsiv hypermail 2b25 tarafindan uretilmistir.