User Profile

Collapse

Profile Sidebar

Collapse
devsusen
devsusen
Last Activity: Feb 25 '10, 07:17 AM
Joined: Feb 9 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • devsusen
    started a topic custom sql statment required

    custom sql statment required

    Hi,

    I require help to design a sql statement to get some specific dataset. This sql statement I need to run using php script.
    Let me first describe the table structure. Table 'tblservicedeta ils' contains the following fields:
    Code:
    'srv_id' INT(11)  NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    'srv_mcid' INT(6) NOT NULL ,
    'srv_jobcodeid' INT(2) NOT NULL ,
    'srv_date' INT(11) NOT NULL DEFAULT 0 
    ......
    ...
    See more | Go to post

  • devsusen
    replied to number_format()
    in PHP
    Oh lovely options. I must put this into my codeing habits. Thank for the information. :)...
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to $_SESSION[] or $my_array[]
    in PHP
    Yes, there was good change in speed. Earlier I was putting approx 80 - 90 variables(mixed datatype) in session. I reduced the no. almost to 5-7. Some of the variable I put in the files and some of them I fetched from the database.

    I was doing some complex processing and there ware many times I wasn't getting the desired result or I was experiencing the page time out. After I made those changes my scripts were running properly and...
    See more | Go to post

    Leave a comment:


  • To send mail using php mail() function or by using some other classes you require a mail server. Wamp server doesn't install any mail server. This is the reason why you are getting the error. php mail() function uses the mail server situated in the localhost. This is the basic function provided by to send mail.

    Now if you use mail classes like PHPMailer or Swift Mailer then you can send mail using POP account. In that case these mail...
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to $_SESSION[] or $my_array[]
    in PHP
    I don't have expart view in this issue, but I prefer to use the 2nd process of using include files. In php version 4.x I had experienced the slow page loading due to storage of lot of variables in the session. From that time onwords I used to store only most req. variables in the session. Other variables I use to put in files (in the form of array) or directly fetch them from database.

    I am very much interested to know other experts...
    See more | Go to post

    Leave a comment:


  • I hope this may help you
    Code:
    RewriteEngine on
    
    RewriteRule ^archive.html archive.php [L]
    RewriteRule ^([A-Za-z0-9_\-]+)\.html$ index.php?u=$1 [L]
    This code written in HTACESS file can do the following :
    http://www.demo.com/articles/pages/php-tutorial.html
    To
    http://www.demo.com/articles/pages/i...u=php-tutorial...
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to upload and display images
    in PHP
    In IE and FF its displaying perfectly alright. I have tested by uploading 3 and 5 images. Have u corrected ur code? In the dummy HTML code I found the </td> tag missing.
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to upload and display images
    in PHP
    I have gone through the above mentioned thread. Now it seems to me that display should looks like a martix, so here is another version of code for that:
    Code:
    <center>
    <table width="650px" border="1" cellspacing="5" cellpadding="5" align="center">
      <tr><td>
    <?php
    $r = 0;
    for($n=0; $n<$total_items; $n++) {
       if($n !=0 &&
    ...
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to Trouble with inserting Checkbox values
    in PHP
    Your code should be :
    Code:
    $spec1 = (isset($_POST['spec1'])) ? 1 : 0; 
    $spec2 = (isset($_POST['spec2'])) ? 1 : 0;  
    $spec3 = (isset($_POST['spec3'])) ? 1 : 0;  
    $spec4 = (isset($_POST['spec4'])) ? 1 : 0;  
    $spec5 = (isset($_POST['spec5'])) ? 1 : 0;  
    $spec6 = (isset($_POST['spec6'])) ? 1 : 0;
    See more | Go to post
    Last edited by devsusen; Feb 27 '09, 12:46 PM. Reason: editing the error mentioned by Dormilich

    Leave a comment:


  • devsusen
    replied to upload and display images
    in PHP
    Your display logic is not very clear to me. Can you put the dummy output HTML code for two cases like 3 images and 7 images. Once I see the HTML code I may try to help you with the php coding....
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to upload and display images
    in PHP
    After looking at a glance I found two problem in your code.

    First one is
    Code:
    $max_items = ceil($total_items / 5); // items per <td>
    if the $total_items is less 5 then the expression will always produce 1 in $max_items.

    Second is in your 2 nested for loop in the display part. For the outermost loop you will always get 5 cells in the table. Each cell will contain atleast one image placeholder and related...
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to Php Help - Form[textbox control]
    in PHP
    You need to use php form validation class that generates client side validation(java script validation) too. You can use HTML_QuickForm from PEAR or validator from phpclasses.
    See more | Go to post

    Leave a comment:


  • I prefer you should googled for your requirement. There are many on fly graphics generator classes/libraries available. Now you need to find out which one will suits you most. I had used pChart earlier.
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to visio type file is not opening
    in PHP
    Hi,

    browser won't open the .vsd file in its own window, instead it will call the assiociated program to open it. Once you try to open .vsd file using some browser, it will ask to select program to open with. Once you select such program then from next time it will open the file using the selected program.

    Browser can display only specific images having extension like .jpeg, .gif, .png as they are web specific image types....
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to visio type file is not opening
    in PHP
    In case of .vsd file the Mime type of the file is application/visio, application/x-visio, application/vsd, application/x-vsd. Most of the browser don't have assiociated program extension to open such mime type. You need to configure your browser i.e assiociate proper program extension with .vsd file extension.
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to Mail
    in PHP
    I use PEAR Mail class and in case of sending mail through SMTP I use PHPMailer.
    See more | Go to post

    Leave a comment:


  • Not very clear to me, but looks like inserting data from XML to MySql using php.
    For this you need the read the XML data and generate sql Insert qureies and run mysql_query() to insert the data into MySql....
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to Record Update
    in PHP
    I think this is due to security reasons. IMO first encrypt the id and send it via URL using GET method. In the receiving page(here edittender.php) again decrypt it an process.

    I prefer to send the value via POST method, though AJAX is good but more complex than using POST or GET method....
    See more | Go to post

    Leave a comment:


  • devsusen
    replied to block users from viewing
    in PHP
    It depends how u like to differentiate users. Most simple method is to have registered users and visitors. In such cases u can use login system so that reg. user can view some page which visitor can't.

    if you can provide us little more detail it will be easier for us to explain or help.
    See more | Go to post

    Leave a comment:


  • After going through the posts in this thread I am also little bit confused about the original problem.

    Original problem is to extract data from a database(or a table?) and dump it in a excell file. Right?

    If this is the case why don't you use Spreadsheet_Exc el_Writer from pear class?
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...