I keep getting the following error:
Parse error: parse error in
/var/www/cgi-bin/ld/lslreporting_edit/libs_by_house.php on line 8
I've included all my code below and marked line 8 with *****
The curios thing is that I copied and pasted the first 8 lines of code from
another script, and that other script works just fine. Both of these scripts
are in the same directory and the lsladmin_connection.inc file is there. The
#! path is correct. I just can't seem to see it. Sorry to burden the list
with another parse error. Thanks.

$ip = getenv('REMOTE_ADDR');
$pattern = "^10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$";
if ((eregi($pattern, $ip)) || ($ip == ""))
*****   mysql_select_db($database_loanstar, $loanstar_connection);
        selectSQL = "SELECT SUM(num_adult_books)
                + SUM(num_child_books)
                + SUM(num_largeprint_books)
                + SUM(num_spanish_books)
                + SUM(num_youngadult_books)
                + SUM(num_other_books) AS num_books, 
                FROM materials, reportinfo, libinfo
                WHERE reportinfo.report_id=materials.report_id
                AND libinfo.lib_id=reportinfo.lib_id
                AND reportinfo.exclude='0'
                GROUP BY libinfo.house_district";       
        $result = mysql_query($selectSQL, $loanstar_connection);
<div align="center">
<h1>Number of books purchased with LoanStar Funds<br />
sorted by House District</h1>
<table width="90%">
        <td>House District</td>
        <td>Books Purchased</td>
        if (mysql_affected_rows > 0)
                while ($row = mysql_fetch_array($result)
                        echo "<tr>\n\t<td>" . $row['house_district'] .
                        echo "\t<td>" . $row['num_books'] . "</td>\n</tr>";
        } else
                echo "<tr>\n\t<td colspan=\"2\">query failed</td>\n</tr>";

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to