Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. cb49747

    adding a decimal point.

    This is exactly what I was looking for. $field3 = sprintf("%.2f",$field3/100); I wanted to do it in one command rather than two. Thanks KevinADC
  2. cb49747

    adding a decimal point.

    That is what I have been doing. But was wondering if there was an easier way.
  3. cb49747

    adding a decimal point.

    I have a number 171500 It should be 1715.00 I have tried using this $field3 = sprintf("%.2f",$field3); but it gives me this 171500.00 How do I add the decimal in the proper place?
  4. cb49747

    Trouble with update statement

    Thanks, I will give this a try. This is correct. My goal is to get rid of the email field in the einfo table as it is redundant. but before I do I need to make sure the information is moved.
  5. cb49747

    Trouble with update statement

    I have two tables with common fields (id number and email) I would like to write an update statement that would place the value for field email in table one into field email in table two if field email is empty in table 2 and there is a value in field email in table one. This is what I tried...
  6. cb49747

    Another select statement question

    I'm dealing with anywhere from 50 to 200 comments per loan. So it is best to use sql to trim it to five. I can see how the sql can get complex. That is why I was using the two queries, this just takes a long time. But if you could give me an idea on how to start with this I would be greatly...
  7. cb49747

    Another select statement question

    I'm looking to get all the information in the first query plus the last 5 comments for each loan selected in the first query. The first query will return about 9000 records I was hoping there was some function like Left Join comments on loaninfo.loannumber=comments.loannumber LIMIT 0, 5...
  8. cb49747

    Another select statement question

    this works however it gives me all the comments when I only want the last five
  9. cb49747

    Another select statement question

    here is a query I run I then get the results run them thru a loop and run this query on every result of the previous query. $lnb is the loannumber selected in the above query. I then display the results of the first query with the last five comments for that loan. this works but is slow...
  10. cb49747

    secure download of pdf files

    Thanks for your input. I appreciate it.
  11. cb49747

    secure download of pdf files

    So after some thinking I did this. I set the following in the Apache web server <Directory "/some/folder/name/"> order deny,allow deny from all allow from localhost </Directory> This in essence allowed only programs on the local machine to access the directory. Then I place...
  12. cb49747

    secure download of pdf files

    I have a site which requires a username and password to access. With in this site is some directories with pdf files. I use perl to decide what pdf files to display and links to them for downloading based on there username. This works great, however if some were to find out the name of one of...
  13. cb49747

    searching for a variable in a regular expression

    ok, now I'm really confused. Is my above code that bad? or are you guys just giving me a hard time. Again here is the completed code. $run_ealert = $dbh->prepare( $ealert_query ); $run_ealert->execute(); $total_emails = 0; while (@alert = $run_ealert->fetchrow_array) {...
  14. cb49747

    searching for a variable in a regular expression

    Just to clarify what I was doing $total_emails = 0; #<---what is this for? this is setting the number of emails to 0 $total_emails++; #<---what is this for? This adds one for each email(ie alert) going out. $temp_text = $ealert_text;#<-- this makes no sense to me. my text for the alert...
  15. cb49747

    searching for a variable in a regular expression

    ok, Problem resolved. I was not print the proper var in the sub routine. My Mistake. I do appreciate all the help with the regular expression. Great bunch here.
  16. cb49747

    searching for a variable in a regular expression

    $ealert_text is my text that contains the ShowField4 and ShowField5 and so on. I then run a query to get the data put it in the @alert array. It is this data that is different for every record it finds. I then set the a new var $temp_text = to $ealert_text so as to not change the original...
  17. cb49747

    searching for a variable in a regular expression

    Kevin, Thanks. Your seems to work as well. appreciate it. The problem I have now is that I need it to run for every record I find. Here is what I have so far. $run_ealert = $dbh->prepare( $ealert_query ); $run_ealert->execute(); $total_emails = 0; while (@alert =...
  18. cb49747

    searching for a variable in a regular expression

    plunkett, Thanks for the explanation. Appreciate it. Your above question is correct but reversed. $ealert_text does not change and the $temp_text should reset to $ealert_text then go thru the for loop and pass off to the sub on each iteration.
  19. cb49747

    searching for a variable in a regular expression

    Plunkett, Thanks. This works. However when I run it in a while statement as it needs to run multiple times I need to get the text to reset back to the original text. Also could you give me a brief explanation on what is happening on this line. $text =~ s/(\$\w+\[[0-9]+\])/$1/eeg;
  20. cb49747

    searching for a variable in a regular expression

    Just to clarify in the second bit of code I have also changed the $ealert_text in the for loop to $temp_text so the code looks like this: $temp_text =~ s/ShowField${c}/$alert[$c]/g; just forgot to add that in the first post.

Part and Inventory Search

Back
Top