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?
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...
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...
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...
Here is the problem. I have various queries stored which grab different information from the database. Associated with each query is some text. This text is different for each query. In this text is information that tell which fields to show and where.
an example of this text would be...
I appologize if this is not the right space, but here it goes. I have a secure site setup that requires a user to login. Once logged in they can run reports off a mysql database. What I want to do now is to also allow the user to download pdf files from my server. user access to pdf files...
I have two tables containting user data. The first table has one record for every user. The second table can have 0 to multiple records per user depending on the programs they have access to.
I want to display every user and place a flag next to the ones that have access to the...
I'm not sure how to do this and was hoping for some help here.
I have a transaction table, wich has multiple transactions for one customer. each transaction has type. I want to find all customers who do not have a particular type of transaction.
The problem I have is it seems to find a...
I'm trying to write a simple fetch program to get some files from a sftp server.
Here is what I got.
$args{debug} = "true"; $args{user} = $ftp_user; $args{password} = $ftp_pass;
$sftp = Net::SFTP->new($ftp_site, %args) or die "Cannot connect to $ftp_site: $@";
@files =...
I'm running this query
UPDATE loans SET altloannumber = LTRIM( altloannumber, '0' ) WHERE investornumber =323;
the field altloannumber is a varchar field.
I get this error.
Any ideas?
here is some code I use
my $outfile = "/data/home/xxx/xxx/holder_u.txt";
my $cmd = qq(/usr/bin/gpg --no-tty --passphrase-fd 0 -o $temp_path$p --decrypt $upload_path$p > $outfile 2>&1);
$| = 1;
open(FH, "| $cmd") || die qq(Can't open pipe to "$cmd".\n);
print FH "$pass\n";
close(FH) || die...
I have a program used to read a xml file and then update a mysql database with info from the xml file. Below is some of the program.
use XML::Simple;
use Data::Dumper;
# create object
$xml = new XML::Simple;
# read XML file
$data = $xml->XMLin($xml_file);
# access <post> array...
OK,
Everything was working fine, the power went out and when the power came back on, the computer was restarted and did not restart. I booted from my xp sp2 cd and repaired my xp installation.
Everything seems to be back to normal with the exception of xp not assigning a drive letter to my...
Hello,
I have this query that works but now I want to refine it so that it only selects records in the loaninfo table that do not have a record in the achtransfer table. I not sure how to do that. Here is the query I have now.
SELECT loaninfo.loannumber, loaninfo.investornumber...
Ok,
I have a date that will change on the user, but will be in this format 20060201 which is Feb 1 2006. I than run a loop any where from 1 to 360 times. Every time I run the loop I want the date to advance one month. I know I could do this by grabing the month (02) and than add one every...
I had a java script that worked perfectly when located in the head section of html file. removed java and placed in .js file and then get error.
here is insert line.
<script LANGUAGE="javascript" type="text/Javascript" src="sg1_java.js"></script>
The error I get is object expected.
any...
I have a csv file that looks like this
field2,field3,field4,field5
I using the following sql statement to place this into a table.
LOAD DATA LOCAL INFILE \'$df\' INTO TABLE $table FIELDS TERMINATED BY \',\' ENCLOSED BY \'\"\' ESCAPED BY \'\\\\' LINES TERMINATED BY \'\\r\\n\'
The problem...
Here is a script I wrote.
<SCRIPT LANGUAGE="JavaScript">
function CheckAccess(f) {
var allowableInvestors = new Array();
allowableInvestors["001"]="001";
allowableInvestors["004"]="004";
if (f != allowableInvestors[f]) {
alert ("I'm sorry, you do not have proper rights to give...
I have xp pro sp2 running on machine, Norton Antivirus which is fully updated found w32.spybot.worm and Download.Trojan in four files. Norton than says can not quarentine or delete the files as access is denied. I'm logged in as administrator. I looked for the file manually but could not see...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.