<font size=4 face=verdana,arial>BadBlue Report</font>

February 2003   VOLUME 3 ISSUE 1  
Need to share Word documents - without giving away your originals?
Run a web site (with domain name) on your PC!
Select a browser bookmark: get data!
PHP Watch: take advantage of LiveSQL for quick database access
Building solutions? Join BadBlue's new Certified VAR program
BadBlue major feature list by version

Click for a custom solution
PHP Watch: take advantage of LiveSQL for quick database access

LiveSQL lets users bookmark a query (or other SQL statement) in their browsers. By clicking on the link, the query is executed and data returned in several common formats. But what's that mean for PHP developers?

In simple terms: the easiest way to process database data in PHP.

As you know, PHP makes it easy to read a web page using a URL. The fopen function really does all the work. LiveSQL lets you create a a simple URL that BadBlue can use as a SQL statement. For instance, a URL that selects all fields and records from the inventory table of an Access database might look like this:


Note the SQL portion of the URL ("select * from inventory"). Your PHP code can simply "fopen" the URL and immediately start reading the resulting query data in comma-separated, tab-delimited or XML format.

The following code snippet takes advantage of the fopen function and runs a URL that performs the select:

   <html><title>LiveSQL Test</title><body><font face="verdana,arial">


      $sURL = "http://..."; // URL from LiveSQL test page

      $fd = fopen($sURL, "r");

      if ($fd) {

         while (!feof($fd)) {

            $sTemp = fgets($fd, 4096);

            $aTemp = explode("\t", $sTemp);

            for ($n = 0; $n < sizeof($aTemp); $n++) {


               // Each array item now contains a field ready to

               //   saved or displayed...








This example uses a URL that generated tab-delimited data. Each line is read using the 'fgets' function into a temporary string variable named 'stemp'. That variable is then exploded into an array so that each field can be easily managed.

Try LiveSQL free (it's a record-limited version, but fully functional).

Or purchase Enterprise Edition and get complete LiveSQL support, file uploads, one-touch publishing of Excel, Word and Access files, customizable system tray menus - and more. Get all the features of Enterprise Edition!

Companies Using PHP

Lastly, we'll wrap up with our traditional list of large or otherwise significant organizations that are using PHP to drive their businesses:

CapitalOne, NASA, the W3C, HP, Google, Deutsche Bank, Redhat, Lycos, Cisco, Ericsson, Volvo, Motorola, SourceForge, Honda, Xoom, WinAmp, Sony Music, Vodafone, CBS, Cap Gemini Ernst & Young, the US Army, UPI, the New York Yankees, Southwestern Bell, the San Diego Zoo, the Oakland Raiders, Audi, Subaru, VA Linux, Winamp, Duke University, Quicken, The Village Voice, Undernet, Access Micro, Columbus Dispatch, Indianapolis Star, Yahoo, Indiana University, Deutsche Telecomm, Bang & Olufsen, Siemens, Unilever, Philips, BMC, NTT, Air Canada, Lufthansa, Dialpad, BMC, Mitsubishi, MP3.com, the Arizona Republic, Deloitte Consulting

Click here for a special offer on BadBlue Enterprise Edition

Get Licensed!
Get file uploads, custom menus, full Office sharing, LiveSQL and more when you upgrade to BadBlue Enterprise Edition. For a limited time, all of the features are priced at just $44.99 backed by our standard, iron-clad guarantee.

Need the latest copy of BadBlue Personal Edition? Get it now, free!

Published by BadBlue
Copyright © 2003 Working Resources, Inc.. All rights reserved.
Features subject to change. Use of software is subject to acceptance of terms and conditions of End User License Agreement (EULA).
Powered by iMakeNews.com