<% Set Connect = Server.CreateObject("ADODB.Connection") strConnMySql = "DRIVER=MySQL ODBC 3.51 Driver;SERVER=localhost;db=Z08149_bl15001_blacklemon_35b; uid=Z0814_wppcnight;pwd=nrVg4?26" Connect.Open strConnMySql Session.Lcid = 1040 cod = Request.QueryString("cod") IF isNumeric(cod) = true THEN cod = Int(cod) Set RecSet = Server.CreateObject("ADODB.Recordset") SQL = "SELECT * FROM wp_postmeta WHERE meta_key LIKE 'pcn_old_id' AND meta_value LIKE 'libro-"&cod&"' ORDER BY post_id DESC LIMIT 1" RecSet.Open SQL, Connect IF NOT RecSet.EOF THEN id_libro = RecSet("post_id") END IF RecSet.Close Set RecSet = nothing Page = "index.php?p="&id_libro ELSE Page = "index.php?p="&cod END IF Connect.Close Set Connect = nothing Response.Redirect Page %>