Jump to content

gsc1ugs

New Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About gsc1ugs

  • Rank
    Newbie
  1. I'm trying to install a php pro script called php pro bid and I cant even get to the license page, it says success and database creation but the link to view your site goes back to installation again? any help please? do I need to delete a folder like OPENCART once installed?
  2. Hi I'm new to PHP but not a complete novice but its not same as ASP, can I ask how a call a function from with a class? my example code: I would like to call the function repairCategories(0); class MyClass { public function repairCategories($parent_id = 0) { $query = $this->db->query("SELECT * FROM {category} WHERE parent_id = '" . (int)$parent_id . "'"); foreach ($query->rows as $category) { // Delete the path below the current one $this->db->query("DELETE FROM {category_path} WHERE category_id = '" . (int)$category['category_id'] . "'"); // Fix for records with no paths $level = 0; $query = $this->db->query("SELECT * FROM {category_path} WHERE category_id = '" . (int)$parent_id . "' ORDER BY level ASC"); foreach ($query->rows as $result) { $this->db->query("INSERT INTO {category_path} SET category_id = '" . (int)$category['category_id'] . "', `path_id` = '" . (int)$result['path_id'] . "', level = '" . (int)$level . "'"); $level++; } $this->db->query("REPLACE INTO {category_path} SET category_id = '" . (int)$category['category_id'] . "', `path_id` = '" . (int)$category['category_id'] . "', level = '" . (int)$level . "'"); $this->repairCategories($category['category_id']); } } }
  3. Hi Seems PHP is more popular now than asp, can someone convert this to PHP give me a start? sub count Dim strConn Set rsUpdate = Server.CreateObject("ADODB.Recordset") Set strConn = Server.CreateObject("ADODB.Connection") typeid = Request.Querystring("typeid") identityid = Request.Querystring("identity") strConn = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" &server.MapPath("bad.mdb")&";" mySQL="UPDATE advertTable set clicks=clicks+1 WHERE companyid="&typeid&" and locationid="&identityid 'Response.Write mySQL rsUpdate.Open mySQL, strConn, 2, 1 Set rsUpdate = nothing select case typeid case 1 Response.Redirect "http://www.s1.com" case 2 Response.Redirect "http://www.s2.co.uk" case 3 Response.Redirect "https://www.s3.co.uk/main.cgi?aff=2895" case 4 Response.Redirect "http://www.s4.co.uk/forum/index.php" case else Response.Redirect "http://www.s5.co.uk" end select end sub
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.