I am in the early stages of learning PHP as an alternative to ASP.  I am
using MySQL and need a beginning nudge.  If anyone has the time, could you
please convert the following basic code block into pure PHP/MySQL minus all
the MS bits?  It's a very simple example I know but the principles would
help me to understand some things that are not sinking in right now.  Thank
you!

<%

strConnection = "driver={MySQL ODBC 3.51
Driver};server=localhost;user=username;"
strConnection = strConnection & "pwd=demo;database=mysql450"

 Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open strConnection

 strSQL = "SELECT * FROM categories"

  Set objRS = objConn.Execute(strSQL)

 Do While Not objRS.EOF
  Response.Write objRS("categoryid") & ", "
  Response.Write objRS("catdescription") & ", "
  Response.Write objRS("catimage") & "<br>"
  objRS.MoveNext
 Loop

 objRS.Close
 Set objRS = Nothing
 objConn.Close
 Set objConn = Nothing

%>

David





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

Reply via email to