Subject | Re: SQL statement with multiply function |
---|---|
Author | majstoru |
Post date | 2006-03-15T13:02:33Z |
--- In firebird-support@yahoogroups.com, "Nigel Weeks" <nweeks@...>
wrote:
If you please send me a zip with this demo, it is a great idea to use
Delphi in combination with PHP scripts, so I can use thjat sample in
my another application problems like this!
Thanks again!
wrote:
>"masterkey");
>
>
> > -----Original Message-----
> > From: firebird-support@yahoogroups.com
> > [mailto:firebird-support@yahoogroups.com]On Behalf Of majstoru
> > Sent: Wednesday, 15 March 2006 12:12 PM
> > To: firebird-support@yahoogroups.com
> > Subject: [firebird-support] SQL statement with multiply function
> >
> >
> > Hi,
> >
> > I have a data in table (example)
> > Table1
> > id name qty
> > 1 Article 1 3
> > 2 Article 2 2
> > 3 Article 3 1
> >
>
> To do this on the client side, I'd use PHP...
>
> <?php
> $conn = ibase_connect("server:/path/to/database.fdb","sysdba",
> $sql = "select * from Table1";without
> $rec = ibase_query($sql);
> while($obj = ibase_fetch_object($rec)){
> // Now do a loop for each article
> for($a=0; $a < $obj->QTY; $a++){
> echo "Sticker for '".$obj->NAME."'";
> } // End of qty loop
> } // End of record while loop
> ?>
>
> That's why I love PHP! Too easy!
> If you want a demo of this to run directly against your database,
> having to install PHP, let me know!Thanks Nige,
> (I can roll a tiny .zip with all files necessary to run this)
>
> Nige.
>
If you please send me a zip with this demo, it is a great idea to use
Delphi in combination with PHP scripts, so I can use thjat sample in
my another application problems like this!
Thanks again!