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. 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..
  3. 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/
  4. 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 -->')";
  5. Thanks ignace & tibberous. I hope Moodle , will meet my requirements. Let me try it first and let you know. Thanks again
  6. 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
  7. You missed one close brace '}' for else else { // insert the data put one '}' at end.
  8. 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
  9. 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
  10. it showing CentOS release 5.2 (Final) Kernel \r on an \m
  11. I have no idea abut it, Is there anyway to know which distro are using on my server? I tried this uname -a It saying only Linux, nothing abut distro...
  12. I've tried both, but showing error -bash: yum: command not found -- -bash: apt-get: command not found Also I'm new to Linux, so can you please elborate on this, yum build-essential yum gcc -- apt-get build-essential apt-get gcc
  13. Hi, Is it possible to install gcc(c compiler) on server thru putty? If so what are the commands for it? Also from where I can get gcc package, i already googled a lot but didn't get the exact one. Any references from your side ? Thanks in advance
  14. yes it get fixed when log-inned with primary ftp user details.....was some login mistakes..... thanks.
  15. my Putty port field is filled up with 22 by default... also i don't have much idea abut it...
  16. Hi all, I want to connect my linux server tru SSH, so i enabled SSH in my hosting account(godaddy) and tried to connect using PuTTY. But PuTTY showing error message : 'Access Denied' when i loggined with username and password. And the same login details are connecting sussessfully for direct entry. Any idea about why this error 'Access Denied' in PuttY ? Thanks in advance
  17. thank you then I tried following code <?php echo "--> ".$absolutepath_to_root = $_SERVER['DOCUMENT_ROOT']; // for me it gives something like this - /home/content/t/h/a/mywebname/html ?> <img src= "images/Header.jpg" /> <img src= '<?php echo $absolutepath_to_root."/images/Header.jpg" ?>' /> It output first image (usual way). But second one dosen't, as you mentioned this should also been worked, am I right? OR something wrong with me ?
  18. but there is no default 'cache' folder. then another doubt is what is the 'Absolute path' ($_SERVER[DOCUMENT_ROOT]) and what is the difference between root directory and absolute path?
  19. it maybe.... and also can u please explain more on '/tmp?'
  20. Hi, Can anybody answer following query...... I have a linux server on godaddy hosting, i just want to know whether there is a a default 'cache' folder in the root directory ? Thanks in advance.
  21. Hi all, Which is the simplest and easiest method to make a website multilingual, is it putting files in different folder for different languages? or something else ? any suggestions will be appreciated. Thanks in advance
  22. Hi, I will appreciate you for helping me to find out some resources to make a personal identification system. plz lead me to the correct forum if not ! Thanks in advance
  23. <?php echo "<a href='".$_SERVER['PHP_SELF']."?c=$catId&p=$pd_id'>link</a>"; ?>
  24. Hi all, I'm seeking some suggesion on my dattabase design for a simple mail communication system. In my website i'm gonna implement it, message communication among site members. The basic work flow is: Suppose there are two users user1 & user2. If user1 sent a message to user2, that will appear on user2's inbox and vice versa. So that they can communicate each other by different messages. And each message has an option to reply, so they can sent replies to that parent message. (like gmail,yahoo etc). here is my db structure so far tbl_messages -id -message -datetime -delete_status_on_inbox -delete_status_on_sentitem -read_status tbl_user -id -status tbl_map_message_user -message_id -sent_id -receiver_id After this i'm confused about where to keep and track replies within each messages (whether in same table [tbl_messages] OR in a new table)... please suggest. I'm looking same features of gmail, eg; on posting new reply, that message become highlighted and reply goes under it. can I use a table like this (maybe not) tbl_replies -id -message_id -reply_message -datetime If u need any clarification on table fields, please let me know. Please share your experience on this. 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.