71
Mazar
Having problem with xoops formdatetime
  • 2009/8/27 7:59

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


I am trying to insert date time as unix timestamp in database
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



72
Mazar
Pcpin chat with xoops integration
  • 2009/8/26 9:50

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


I have seen some thread here about pcpin chat module for xoops. But i can not find anywhere download link for it. not even in pcpin site
Does anyone have the link or does pcpin work as XOOPS module please let me know



73
Mazar
Re: Hi, how can i get user email and name using uid?
  • 2009/8/26 7:22

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


i am using simple query but i wanted to use objects to query and get. it is working with simple query



74
Mazar
Hi, how can i get user email and name using uid?
  • 2009/8/26 7:18

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


Hi i want to get the username and email address using the uid
how can query database to get the info using uid

for example i am sending a emal from loged in user to
a selected user which i got only id i want to get the email address of the selected user and send email to only that user




75
Mazar
Re: new settings & home page
  • 2009/8/25 21:14

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


find this code block in xoopsversion.php of your news module
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);


then add in array
like
$modversion['config'][1]['options'] = array('1' => 1'2' => 2'3' => 3'5' => 5'10' => 10'15' => 15'20' => 20'25' => 25'30' => 30);



76
Mazar
Re: I am having problem with date and time insertion in xoops database
  • 2009/8/25 9:16

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


ok that was mot was a mistake here. but it is correct in here

my print_r post shows date and time in another array
somehting like
Array ( [bookings] => 1 [bookings_date] => Array ( [date] => 2009-08-25 [time] => 44400 ) [bookings_description] => sdfadsfasdf

this is my insert code

$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;
    }



77
Mazar
I am having problem with date and time insertion in xoops database
  • 2009/8/25 8:28

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


my XOOPS form
$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
(11Mot NULL,
bookings_time      int(11Mot NULL,


when i am submitting it is inserting all the data except date and time



78
Mazar
Re: How can i get global userid in admin section of my module to query the database
  • 2009/8/24 13:30

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


thanks solved it, i had a wrong column name in my criteria.



79
Mazar
Re: How can i get global userid in admin section of my module to query the database
  • 2009/8/24 13:26

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


I can get the userid now. yeah i guess this renderwhere not working
I tried other method saw in a post by trabis but that also not seems to be getting the rows from table

$criteria = new CriteriaCompo(new Criteria('userid'$uid));
        
$criteria->setSort("date");
        
$criteria->setOrder("ASC");
        
$numrows $bookingsHandler->getCount();
        
$bookings_arr $bookingsHandler->getall($criteria);



80
Mazar
How can i get global userid in admin section of my module to query the database
  • 2009/8/24 13:03

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


$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);




TopTop
« 1 ... 5 6 7 (8) 9 10 11 ... 14 »



Login

Who's Online

151 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 151


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits