Posted by brad on 03/20/06 21:26
The following is a short ASP script and I would like to change it into
a PHP script. The script of off of the W3 Schools wep
site(http://www.w3schools.com/ajax/ajax_database.asp). I am not sure
what would need to be changed to fit into the PHP syntax. Alright, here
is the short script I need help with. Have at it if you want to help
me. Thanks in advanced to any help at all.
sql="SELECT * FROM CUSTOMERS WHERE CUSTOMERID="
sql=sql & request.querystring("q")
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/db/northwind.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open sql, conn
response.write("<table>")
do until rs.EOF
for each x in rs.Fields
response.write("<tr><td><b>" & x.name & "</b></td>")
response.write("<td> & x.value & "</td></tr>")
next
rs.MoveNext
loop
response.write("</table>")
[Back to original message]
|