Jump to content

avvllvva

Members
  • Posts

    140
  • Joined

  • Last visited

    Never

Everything posted by avvllvva

  1. Following is my current json obj string [ {"productId":"101","price":99}, {"productId":"201","price":88}, {"productId":"301","price":77}, {"productId":"101","count":3}, {"productId":"201","count":5}], {"productId":"301","count":2}], {"productId":"101","month":12}, {"productId":"201","month":10}], {"productId":"301","month":09} ] i want to convert it into following format ie; grouping by product id along with their parameters together [ {products:'101',parameters[99,3,12]}, {products:'201',parameters[88,5,10]}, {products:'301',parameters[77,2,09]} ] -thanks
  2. Thanks guys for your info. how can do it with php?
  3. Hi, I need to compare records in a table based on the 'datetime' field, like if the difference between time is less than 15min. need to combine the records(rows) as a single resultant row until the time difference between them is less than 15min and when a record's time difference is >15min that should return as another row and so on. Please find following sample table and the required output format Sample Table: ID NAME DATETIME 1 aaa 2011-10-10 06:30:00 2 bbb 2011-10-10 06:33:00 3 ccc 2011-10-10 06:38:00 4 ddd 2011-10-10 06:40:00 5 eee 2011-10-10 07:10:00 6 ffff 2011-10-10 07:14:00 7 sss 2011-10-10 08:16:00 8 jjj 2011-10-10 08:26:00 9 kkk 2011-10-10 08:28:00 10 mm 2011-10-10 09:46:00 11 ppp 2011-10-10 09:49:00 12 qqq 2011-10-10 09:52:00 Output Needed : IDs START DATETIME END DATETIME 1,2,3,4 2011-10-10 06:30:00 2011-10-10 06:40:00 5,6 2011-10-10 07:10:00 2011-10-10 07:14:00 7,8,9 2011-10-10 08:16:00 2011-10-10 08:28:00 10,11,12 2011-10-10 09:46:00 2011-10-10 09:52:00 You can see 1st row in the output table having IDs 1,2,3,4 coz the time difference between them is less than 15minutes (it doesn't means time difference between start and end; it is actually the time difference between current record and previous one ; ie; ID-1 and ID-2 have difference less than 15min and ID-2 & ID-3 have difference less than 15min and ID-3 & ID-4 have difference less than 15min, so those 4 records combine together as a single row also shows their start time and end time. Then you can see diff between ID-4 and ID-5 is greater than 15 min so it should display as new row, and so on) How can I acheive above Output with mysql query ?? Please help..
  4. Thanks Again ! Moodle is the best LMS(Learning/course Management System), I found so far. And I'm working on it, thanks Guys for your info. http://moodle.org/
  5. I think, there is some problem with single-quotes in the mysql string, try this modified query string $query = "INSERT INTO news_articles VALUES ('<--- MORE CONTENT BEING INSERT INTO MYSQL -->','$news_cat','$news_content','<--- MORE CONTENT BEING INSERT INTO MYSQL -->')";
  6. Thanks ignace & tibberous. I hope Moodle , will meet my requirements. Let me try it first and let you know. Thanks again
  7. Yes, most websites are... But here I don't know what subject title i have to put to describe my requirement. And sorry for any confusion made by that. I hope you understood my requirement, can you please help me on that ? thanx
  8. You missed one close brace '}' for else else { // insert the data put one '}' at end.
  9. Hi All, I just want to know, which will be the best cms/application/framework for a multi-user collaborative website? [lets say, Magento for ecommerce solution] Following is my requirement:- For example, Admin can start a topic(maybe a online course study material), and he will allow to view only few members, so that members can read/study and post their comments about it and they can share files among them, and ask questions to Admin, and submit a report to admin. Finally Admin can ask for report to each members and can perform an exam on it. So from your understanding, what cms/framework you will suggest for help me to implementing this. Thanks in advance
  10. Hi All, I want to create a simple WEBMAIL application from scratch and I've already started with the help of IMAP functions. Listing & Viewing (of Inbox Messages) modules almost completed. Now I want to create an option for composing & sending emails. I've tried imap_mail() function, but there were some problems. So can anybody help me on this, if it there any available resources for it maybe classes or functions?? Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.