~jorge/charms/precise/lamp/readme-fixes

« back to all changes in this revision

Viewing changes to website/database.php

  • Committer: Victor Palau
  • Date: 2012-09-04 18:31:25 UTC
  • Revision ID: vtuson@gmail.com-20120904183125-erhekfwi0ldadcyf
added option to set up a bzr branch for website installation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
include '../webconfig/opendb.php'; 
4
 
 
5
 
//run query
6
 
$query=mysql_query("SELECT * FROM mytodo WHERE todo_id > 0");
7
 
while($result=mysql_fetch_assoc($query))
8
 
        $output[]=$result;
9
 
 
10
 
print(json_encode($output));
11
 
 
12
 
mysql_close();
13
 
?>