/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/application/models/codeviewer/codeviewer_model.php

  • Committer: c11oscjo
  • Date: 2013-04-19 13:23:12 UTC
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: c11oscjo@student.his.se-20130419132312-5icivw6j8w8wpyek
Change attribute and table names according to the database.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
        function getCode($cid, $example, $page) {
9
9
 
10
 
                $this->db->from('files');
11
 
                $this->db->join("pagesfiles", "pagesfiles.Files_fileName = files.fileName");
12
 
                $this->db->where("pagesfiles.Pages_name", $page);
13
 
                $this->db->where("pagesfiles.Pages_Examples_Name", $example);
14
 
                $this->db->where("pagesfiles.Pages_Examples_Courses_courseID", $cid);
15
 
                $this->db->not_like("pagesfiles.Files_fileName", $cid."/".$example."/".$page."/"."documentation");
 
10
                $this->db->from('Files');
 
11
                $this->db->join("PageFiles", "Pagefiles.fileName = Files.fileName");
 
12
                $this->db->where("PageFiles.pagesName", $page);
 
13
                $this->db->where("PageFiles.exampleName", $example);
 
14
                $this->db->where("PageFiles.courseID", $cid);
 
15
                $this->db->not_like("PageFiles.fileName", $cid."/".$example."/".$page."/"."documentation");
16
16
 
17
17
                $query = $this->db->get();
18
18
                $output = "";
50
50
 
51
51
        function getDoc($cid, $example, $page){
52
52
                $this->db->select('dataBlob');
53
 
                $this->db->from('files');
54
 
                $this->db->join("pagesfiles", "pagesfiles.Files_fileName = files.fileName");
55
 
                $this->db->where("pagesfiles.Pages_name", $page);
56
 
                $this->db->where("pagesfiles.Pages_Examples_Name", $example);
57
 
                $this->db->where("pagesfiles.Pages_Examples_Courses_courseID", $cid);
58
 
                $this->db->where("pagesfiles.Files_fileName", $cid."/".$example."/".$page."/"."documentation");
 
53
                $this->db->from('Files');
 
54
                $this->db->join("PageFiles", "PageFiles.fileName = Files.fileName");
 
55
                $this->db->where("PageFiles.pageName", $page);
 
56
                $this->db->where("PageFiles.exampleName", $example);
 
57
                $this->db->where("PageFiles.courseID", $cid);
 
58
                $this->db->where("PageFiles.fileName", $cid."/".$example."/".$page."/"."documentation");
59
59
 
60
60
                $query = $this->db->get();
61
61
                $result = $query->result();