i have my fields as INT in database
but how can insert them. the date time is going into two dimensional array
which has been giving me headache from past two days.
can anyone point out how can insert them to database
* Select the number of news items to display on top page
*/
$modversion['config'][1]['name'] = 'storyhome';
$modversion['config'][1]['title'] = '_MI_STORYHOME';
$modversion['config'][1]['description'] = '_MI_STORYHOMEDSC';
$modversion['config'][1]['formtype'] = 'select';
$modversion['config'][1]['valuetype'] = 'int';
$modversion['config'][1]['default'] = 5;
$modversion['config'][1]['options'] = array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30);
$modversion['config'][1]['options'] = array('1' => 1, '2' => 2, '3' => 3, '5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30);
$booking_handler =& xoops_getModuleHandler('medical_bookings', 'medical');
$obj = $booking_handler->create();
$obj->setVars($_POST);
if (!$booking_handler->insert($obj)){
$msg = _AM_BOKKING_MSG_ERROR;
}else{
$msg = _AM_BOOKIng_MSG_SUCCESS;
}
$form->addElement(new XoopsFormDateTime(_AM_MEDICAL_BOOKINGS_TIME, 'bookings_date', ""));
My class
$this->initVar("bookings_date",XOBJ_DTYPE_INT,null,false,10);
database field name is
bookings_date int(11) Mot NULL,
bookings_time int(11) Mot NULL,
$criteria = new CriteriaCompo(new Criteria('userid', $uid));
$criteria->setSort("date");
$criteria->setOrder("ASC");
$numrows = $bookingsHandler->getCount();
$bookings_arr = $bookingsHandler->getall($criteria);
$criteria = new CriteriaCompo();
I want to to be able to get the uid of loged in person something like
uid = in the database field userid.
$criteria->renderWhere('uid','userid');
$criteria->setSort("date");
$criteria->setOrder("ASC");
$numrows = $bookingsHandler->getCount();
$bookings_arr = $bookingsHandler->getall($criteria);