how to create a waiting list for an appointment in php with codeigniter...any guide please

Recommended Answers

All 9 Replies

That's a little vague. Guide to using CI, or more info on your waiting list (which requires much more information), or both? CI tutorials are all over the web, searching does wonders.

I did search but to no avail..
What i want is if someone has cancel an appointment...and want to reschedule..
The secretary got to check a waiting list inorder to re-schedule it :/....

You can do it by creating a status column in your database; such that when an appointment is made, for instance; you can set the status to 1 for pending or 2 for completed or 3 for cancelled.

That should do the trick.

ohh..i have it....but wen its cancel , i want like a waiting list :(

Add a timestamp too, then you can query who cancelled first.

You can get better information if you try explaining your requirements in more than a single line.

Oki :)

Well what i want is..
A patient get registered ...
Now, the patient want to make an appointment . .
So appointment is created...
Now i want like if the patient want to cancel the appointment then reschedule..for some other day, and the patient gives a date..
Now the doctor got to check in waiting list if on that particular time/date ...theres no appointment..
My problem is how to do it..
Its with Php with Codeigniter+Mysql ..
Please help me out..
I already created the appointment Form..


class Appointmenttest extends CI_Controller {

    public function __construct(){

    public function index()
                                ->save();  // insert
        // select
        echo $this->appointment_model->getType();

        // update



<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Appointment_model extends CI_Model
    private static $table='appointment';
    private $id;
    private $type;
    private $date;
    private $time;
    private $price;
    private $status;
    private $patient_id;
    private $employee_id;
    private $treatment_id;

    public function getId()
        return $this->id;

    private function setId($id)
        return $this;

    public function getType()
        return $this->type;

    public function setType($type)

        return $this;

    public function getDate()
        return $this->date;

    public function setDate($date)

        return $this;

    public function getTime()
        return $this->time;

    public function setTime($time)

        return $this;

    public function getPrice()
        return $this->price;

    public function setPrice($price)

        return $this;

    public function getStatus()
        return $this->status;

    public function setStatus($status)

        return $this;

    public function getPatient()
        return $this->patient_id;

    public function setPatient($id)

        return $this;

    public function getEmployee()
        return $this->employee_id;

    public function setEmployee($id)

        return $this;

    public function save()

        if ($this->getId()) {
            $this->db->where('Appointment_ID', $this->getId());
            $this->db->update(self::$table, $data);
        } else {

    public function findById($id)
        $query=$this->db->get_where(self::$table, array('Appointment_ID' => $id));

            return false;

        return $this;

    public function findAll()

        return $query->result();

I want create a waiting list for students who have registered for school and are waiting to be placed.
There should be a waiting list, maybe for 1-30 students and from that list i manage to place only 10.
If I managed to place 1-10 that means am left 20, after that i want that student who was number 11 now to be number 1 because the first 10 have gone.

I hope you understand what am trying to say.

Thank you in advance.

Member Avatar

Start your own thread if not directly related to the OP.

However, you just have a flag field (as noted above) for 'waiting', 'placed' (or 0,1) and a timestamp or datetime for when the student made the application. Simple.

SELECT * FROM `students` WHERE `status` = 0 ORDER BY  `app_time` LIMIT 20
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.