Jump to content

seenu_vas80

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

seenu_vas80's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for reply. I have tried this.But I'm getting the following result. While running the query we need the result row as: Id Text_val Ver_no doa 1 Message 5 EN001 2009-05-26 4 Message 6 EN002 2009-05-27 Need help on this..
  2. HI, Iam facing a problem while comparing two tables to get the latest result from the table 2. I have mentioned the problem in detail below. Table1 Id Name ver_no Flag Attempt 1 Lorem Ipsum EN001 1 6 2 Lorem Ipsum EN002 2 5 Table2 Id Text_val Ver_no Status Doa 1 Message1 EN001 A 2009-05-26 2 Message 2 EN001 A 2009-05-26 3 Message 3 EN001 A 2009-05-27 4 Message 4 EN002 A 2009-05-27 5 Message 5 EN001 A 2009-05-27 6 Message 6 EN002 A 2009-05-27 By comparing these two tables, we need to get the latest record in the table2 for each and every version. We have tried by using “Group by” clause of the field ‘ver_no’ which is common to both the tables. While doing this we are getting the record which has been inserted at the beginning of each ver_no and not the latest one. While running the query we need the result row as: Id Text_val Ver_no doa 5 Message 5 EN001 2009-05-27 6 Message 6 EN002 2009-05-27 I have listed the query which we have tried below: Select table2.id, table2. Text_val, table2.ver_no, table2.doa from table1, table2 where table1.ver_no = table2.ver_no group by table2.ver_no These query returns the first entry of the version in the table2 as a result. But I need the latest record that has been inserted in the table2 as the result. I have tried with the table operations also. but i couldn't get the result which i expect. Need help on this.
  3. Both of you thanks for the reply. finally, I found the solution SELECT * FROM `report_hours` WHERE ( ( start_date >= '2009-04-01' && start_date <= '2009-05-08' ) OR ( end_date >= '2009-04-01' && end_date <= '2009-05-08' ) OR ( '2009-04-01' BETWEEN start_date AND end_date OR '2009-05-08' BETWEEN start_date AND end_date ) ) the query which "vintox" sent has not worked for few combinations, but it gave us the idea to find out the solution. Still the testing is going on. Thanks a lot. Regards, Srinivasan.C
  4. Hi all, I am facing an issue with MYSQL query. I am having a table named “report_hours” Id Category_type hours start_date end_date 1 2 2 2009-05-02 2009-05-03 2 4 23 2009-05-02 2009-05-07 3 6 12 2009-04-02 2009-05-07 From the above table I am generating a report, where the user will be prompted for “From Date” and “To Date” Now I would like to retrieve the records which are between the dates given by the user I have tried some options with keyword “between clause” in mysql but I didn’t get the exact results, when the user has selected From date as “2009-04-01” and To date as “2009-05-08” I have listed down the query which I have tried below: Query no 1: SELECT * FROM ` report_hours ` WHERE (`start_date` BETWEEN '2009-04-01' AND '2009-05-08') OR (`end_date` BETWEEN '2009-04-01' AND '2009-05-08') Query no 2: SELECT * FROM ` report_hours ` WHERE (DATE('2009-04-01') BETWEEN DATE(start_date) AND DATE(end_date) )OR (DATE('2009-05-08') BETWEEN DATE(start_date) AND DATE(end_date) )) I need all the 3 records to be displayed when the above date has been selected. Is there any option available in mysql itself to search for date in a range (between two columns?). Need help on this. Regards Srinivasan
  5. Hi, I have tried that also by adding 1 day to the date read from the excel. whether this will be the right solution in all the cases. Since date column will be converted to unix timestamp from the date 1970.. In that case , server date will differ accordingly and the date will vary.... Please help on this... Regards Srini
  6. Hi, Iam using PHP Excel Reader class to read the datas from the excel and inserting the values into Database accordingly. The problem i face is when the date column field is read from the excel the value is not the same when inserted in the database in the server. Date decrements by one since in the reader.php in the class, the date column value has been converted to corresponding UNIX time stamp. Returned value differs from the original value in the excel. For e.g. the date column value in the excel is 6/17/2008 and it has been converted to UNIX timestamp and value inserted in the database is 06/16/2008. Is there any solution for the above issue. Kindly reply back if there is any other information that is needed for the above issue. How to read the date column from the excel as it is? Any comments will be great help... NOTE:Server PHP version is 5.2.6 and mysql version is 5.0.51 Thanks in advance, Srinivasan
  7. Hi, With the problems you have mentioned i have listed down some of the possible things below... can you have a look at it.. Iam not sure about the message "Website cannot be displayed".... 1. Whether we are checking the session in each and every page. If session expires where we are redirecting the link to.. Also check whether the session is maintained correctly. 2. Check whether there is any loop running for a long time in the file (after the user submits the form). 3. Check the file name where the values are submitted, when the user submits the form .. (since it's a Linux Server file name will be case sensitive)... 4. Whether you have access to FTP .. We can create our own error log directory and change it using ini_set() into the specified path .... Then we can see if there is any error listed in the log...
  8. hi, Second one is the correct one. $var!= ""
  9. Hi, I need to integrate SMS functionality in one of my application. Currently we are starting the application in chennai (in india)zone alone. For that can i have the list of providers available for Integrating SMS (with PHP) in chennai. SMS need to be sent to the corresponding person when the user submits a form. I have searched but i couldn't find any relevant sites. If there is any other way to integrate SMS functionality in PHP application. Any help regarding this will be helpful for me.
  10. Hi, I am working on different country projects, where the delivery time of the project will be saved on their respective country timings.We need to display the time in IST time zone accordingly. I need to calculate the time difference between different india and other countries. For that is there any RSS live feed available to get the time difference between two countries. (dynamic values of the time difference according to the countries) Or else is there any other way to get the time difference? Regards Srini.C
  11. Hi, I am working on the following module, generating reports in excel using php. Here i want to embed the logo of the company. Whether it is possible to insert images in excel using php? (defining only the source of the image from the server) . For this i have used "Spreadsheet::writeexcel2.18 version". In this we are able to display the images in MS-Excel. But it doesn't works in Open office. Any solution for this..
×
×
  • 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.