I will let Pervasvive know that they need to change the pattern. I have some contacts there. Regarding the use of PSQL from Linux, you will not specify which version of PSQL you are using, but you need a PSQL client for Linux. Here is an example that I used earlier to test the connection from PHP on Linux (and WIndows) to the PSQL server. In odbc_connect, "Demodata" is the DSN ODBC name. The other two parameters are username and password. You will need to compile (or enable) ODBC in PHP.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>PHP Sample</TITLE> </HEAD> <BODY> <?php $conn=odbc_connect("Demodata","","",""); $sql="select * from class"; $rs=odbc_exec($conn,$sql); echo "<table border=1>\n"; $numfields = odbc_num_fields($rs); for($i=1;$i<=$numfields;$i++){ $fn=odbc_field_name($rs,$i); echo "<th>$fn</th>"; } echo "\n"; while(odbc_fetch_row($rs)){ echo "<tr>\n"; for($i=1;$i<=$numfields;$i++){ $fv=odbc_result($rs,$i); echo "<td>$fv</td>"; } echo "</tr>\n"; } echo "</table>\n"; echo "<p>Number of Fields: $numfields</p>\n"; ?> </BODY> </HTML>
source share