Hi, need your help with the database manipulation of my calendar events.
below is my scheduler php code:
<?php if(isset($_GET['id'])) { require('config.php'); $id=$_GET['id']; $query='select * from tblaccounts where id='.$id; $result=mysql_query($query) or die(mysql_error()); $row=mysql_fetch_array($result); $color=$row['color']; } ?><!doctype html>
html, body{ margin:0px; padding:0px; height:100%; overflow:hidden; }And below is my mysql connection php code:
<?php if(isset($_GET['id'])) { $id=$_GET['id']; require('config.php'); require('scheduler/scheduler_connector.php'); $query='SELECT s.id, s.startdate, s.enddate, a.firstname as type, a.color, s.event, s.activity, s.clientname, s.contactnumber, s.location, s.description, s.reference, s.owner, CASE WHEN s.owner<>'.$id.' THEN "True" ELSE "" END AS readonly FROM tbluser u, tblschedule s, tblaccounts a WHERE s.owner=a.id AND a.dept_id=u.dept_id'; $conn=new SchedulerConnector($conn); $conn->render_sql($query,"id","startdate,enddate,event,color,clientname,activity,contactnumber,description,location,reference,type,owner,readonly","","type"); } ?>What’s missing in my code so I can directly save/update/delete in the database?