I know alot of you guys are from trinituner and i'm sure you can see their is a lot of errors in the forum. This is so due to lack of optimization of their database. Their are alot of errors on user pages and the whole site loads really slow.
What do you guys think about this
<% 'use some fancy s**t to get the username from the folder. since this is unique then 'we can search the database for that username and find the appropriate ID 'if not found then redirect to the member listing pathinfo = Request.serverVariables("PATH_INFO") pathinfo = replace(pathinfo,"/community/","") pathinfo = replace(pathinfo,"/index.php","") 'check to see if this is a valid user userID = request.querystring("id") if userID = "" then sql = "SELECT * FROM USERS WHERE userName='" & pathinfo & "'" else sql = "SELECT * FROM USERS WHERE userID=" & userID end if Dim strConn strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\database/gallery.mdb") Set Conn = Server.CreateObject("ADODB.Connection") Conn.open(strConn) 'Get a recordset corresponding to the submitted username and password Set rsUser = Server.CreateObject("ADODB.Recordset") rsUser.Open sql, strConn, 3, 3 If NOT rsUser.EOF then %>
What do you guys think about this