Subject Re: ***SPAM*** Re: ***SPAM*** [firebird-php] Using Firebird with InterBase 6 Databases via PHP
Author Lester Caine
jackdmason19 wrote:
> We have four InterBase 6 servers, one for each of our retail stores. All four have static IP addresses. At present, our web pages use a REST command (via Apache) to query/post the dominant server, which then parcels out the InterBase SQL as needed to the other InterBase servers. When the query/post is completed, the dominant server returns the data to the web page (via Apache).
> We would like to have the web pages directly query/post the particular InterBase server they need (via PHP/InterBase/Firebird) with something like the following:
> $SQL ="INSERT INTO PASTORDERS (CUST_ID, DATE_ORDERED, QTY, STOCKNO, WHO_ORDERED, LISTPRICE, DEPOSIT, DISCOUNT, TITLEID) VALUES("; $SQL.="'".$ID."','".$Now."','".$Quantity."','".$EAN."','WEB','".$List. "','".$Deposit."','".$Discount."','".$TitleID."')";
> file_put_contents('SQL2.txt', $SQL, FILE_APPEND);
> $DBRecord=ibase_query($SalesDB, $SQL) or Catch_Err('Add Past Order');
> ibase_commit();
> ibase_close($SalesDB);
> The above is an example of currently working code from a script that runs on our dominant InterBase 6 server. We would like to be able to run that script directly from our web page.
> Can we do this with the PHP Firebird interface?

I can't say I understand quite how you are doing things at the moment, and I
would probably prefer to see some sort of 'replicate' between the 4 databases,
but I assume that essentially all 4 databases should be identical?

My own commerce systems do quite a lot of processing on each line item on an
order, but there is no reason that what you have listed above could not be done
as a simple page post. I suspect that there is a lot more going on that we would
need to understand to be able to accurately assess the whole situation.
Certainly decreasing the stock figure for an item is a more complex process and
presumably the stock levels also contain site information? So processing a web
based order may require a particular branch to ship where they have sufficient
stock of all the items of an order?

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Rainbow Digital Media -