You are here: Re: PHP Question « All PHP « IT news, forums, messages
Re: PHP Question

Posted by Stefan Rybacki on 03/23/06 04:21

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steff schrieb:
> Hello every one,
>
> I need your help because I have no idea how to do this...
>
> how can I get the veg_id into the table veg_type according to the vegetable
> name
> chosen in the pick list ?
>
> do I have to create another query in test2.php which select the veg_id
> from the vegetable table ?
>
> I would like to no what's best, I mean what's professional?
>
> I created those two tables for my test:
>
> create table vegetables (
> veg_id number(5),
> veg_name varchar2(30));
>
> insert into vegetables values (1,'carot');
> insert into vegetables values (2,'spinach');
> insert into vegetables values (3,'potato');
> insert into vegetables values (4,'tomato');
> insert into vegetables values (5,'turnip');
>
> create table veg_type (
> type_id number(5));


Hi Steff,

Explain more according what exactly do you want to achieve. Because I
don't get it ;)

>
> here is my first php
> page=====================================================
>...
>
> $c1=oci_connect("stephane","Stef1975",$bdtest05);
>
> // I have a question mark here because I don't know how to do it
>
> $query="insert into veg_type (id_type) values (?)";


Maybe you want to insert the value of $veg? So set the parameter 1 to
$veg. Look into the oci documentation how this works because I don't
know oci. Well maybe I am wrong because I am just guessing.

Regards
Stefan

PS: change your password once you uploaded your stuff because I know it
know. ;)

> $stmt=oci_parse($c1,$query);
>
> oci_execute($stmt);
>
>
> oci_free_statement($stmt);
>
>
> oci_close($c1);
>
> ?>
>
> // thanks for looking!
>
> //stephane
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)

iD8DBQFEIgYyyeCLzp/JKjARAsRrAJ9zX58gVNzUJklxCsbK6TbMIRgrigCcDcK0
LGynV3cufihADH3JZBLk1Pc=
=Gd7j
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация