Category Covered

How to convert time stamp in 24 hours time  

 Follow the statement to conver timestamp into 24 hours time. $slot = 1377947700; $slot = date('G:i:s', $slot);    
 
By: Tech writer  |   Total Read: 981  |   Read more..

How to listen directly by microphone and speaker in computer  

 Flow the step  In Windows 7: 1) Right click on the speaker icon in your system tray (bottom right of your screen). Go to recording devices. 2) See your microphone in the list. Right click, go to properties. 3) Switch to the "Listen" tab, check off "Listen to this device". While Listen is checked, your microphone will be audible through your speakers, and in a more advanced facet, through stereo mix. So if yo
 
By: Tech writer  |   Total Read: 1376  |   Read more..

Cakephp count with group by  

Below is the simple example that will show you on  how to use count of value with group by. $todayApps = $this->DoctorAppointment->find('all', array( 'conditions'=>array('DoctorAppointment.appointment_date >='=> $firstDayOfMonth, 'DoctorAppointment.appointment_date <='=> $lastDayOfMonth), 'order'=>array('DoctorAppointment.appointment_date'), 'fields'=>array('DoctorAppointment.appointment_date', 'COUNT(`Doc
 
By: Tech writer  |   Total Read: 1851  |   Read more..

Cakephp form action  

To set or change cakephp form action you just follow the below example echo $form->create('Comment', array('url' => array('controller' => 'comments', 'action' => 'actionName'));
 
By: Tech writer  |   Total Read: 768  |   Read more..

PHP timestamp into date time  

You can easily convert PHP timestamp into time or date. Ex: $date = 1373879700;
echo date('H:i:s', $date); //outupt : 09:15:00
 
By: Tech writer  |   Total Read: 1057  |   Read more..

CakePHP session read write  

You can write into session in cakephp by using the following statement $this->Session->write('Booking.docId', $this->params['pass']['1']); You can read into session in cakephp by using the following statement $this->Session->read('Booking.docId'); You can also use the normal session that you used to PHP like $_SESSION
 
By: Tech writer  |   Total Read: 717  |   Read more..

PHP time problem on URL  

Sometimes we see that we cant send time through the url. So on that cases you need to send time as time stamp. Here is an example on how you need to send. $urlstr = strtotime('09:30:00'); Send the $urlstr on the url Now receive and convert the $urlstr $slot = date('h:i:s', $urlstr);
 
By: Tech writer  |   Total Read: 2076  |   Read more..

PHP convert 24 hour time to 12 hour  

Here is an examaple of converting 24 hour time to 12 hour in php.  function twentyfourToTwelve($time) { return date('g:i:s a', strtotime($time . " UTC")); } echo twentyfourToTwelve('15:33:56'); I am sure this will help you to convert 24 hours time to meridian tim.   Convert 12 hour time to 24 hour time
 
By: Tech writer  |   Total Read: 1709  |   Read more..

convert 12 hour time to 24 hour time  

If you want to convert 12 hour time or meridian time to 24 hour time in php then follow the instruction For example i have an array like that   [time_to] => Array ( [hour] => 02 [min] => 00 [meridian] => pm ) Use the following code to convert it into 24 hours time. Here i have created a $date object   $date = new DateTime($time_to['hour'] . ':' . $time_to['min'] . ' ' . $time_to['meridian']);
 
By: Tech writer  |   Total Read: 1249  |   Read more..

Cakephp conditions on association table  

How do i set conditions on cakephp associated tables. This is needed if you have some model and when you are doing query and want to set condition on the associated table. Here i have three models User/Doctor, DoctorSchedule and DoctorScheduleTimeblock, Main Model DoctorSchedule, Here add the behavior on your model   class Post extends AppModel { var $actsAs = array('Containable'); }   You can also attach the behavior on t
 
By: Tech writer  |   Total Read: 796  |   Read more..
Top 15 Posts
Google+