Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. $sql2 = "SELECT c1.ID, c1.si, c2.si, c2.ID as parent_id
  2. FROM v_menu c1
  3. LEFT JOIN v_menu c2
  4. on (c2.parent = c1.ID)
  5. WHERE (c1.ID = :c1)";
  6. $st2 = $this->db->prepare($sql2);
  7. $st2->execute(array(':c1' => $row['MID'])); // $row['MID'] => product category
  8. $res2 = $st2->fetchAll();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement