473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How is this wrong? Please Help.

I am dealing with three different database files. If the user (me) chooses
to edit File 1 it opens File1.csv and so onfor File 3
But File three needs to written in a different format then File 1 and File
2.
My question is about line 4
I am getting an error. Why and what am I doing wrong that I am missing?
any ideas?
Thank you
1 $NextEntry = $perp_year;
2 if ($perp_mon < 10) { $NextEntry .= "0"; }
3 $NextEntry .= "$perp_mon";
4 if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }
5 $NextEntry .= "$perp_day\n";
6 elsif ($perp_day < 10) { $NewEntry .= "0"; }
7 $NewEntry .=
"$perp_day|$INPUT{'Add'}|$URL|$INPUT{'address'}|$I NPUT{'city'}|$INPUT{'state
'}|$INPUT{'zip'}|$INPUT{'phone'}|$INPUT{'time'}|$I NPUT{'FullText'}\n";

Jul 19 '05 #1
1 2036
Seeing that you provided no error message all I can go by is what is in
your post. Carefully look at line 4:

if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }

The second part of your conditional says to assign the string 'File 3'
to the variable $editfiles. I don't think you want to do this but want
to do a comparison.

Rusty
Big Dix wrote:
I am dealing with three different database files. If the user (me) chooses
to edit File 1 it opens File1.csv and so onfor File 3
But File three needs to written in a different format then File 1 and File
2.
My question is about line 4
I am getting an error. Why and what am I doing wrong that I am missing?
any ideas?
Thank you
1 $NextEntry = $perp_year;
2 if ($perp_mon < 10) { $NextEntry .= "0"; }
3 $NextEntry .= "$perp_mon";
4 if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }
5 $NextEntry .= "$perp_day\n";
6 elsif ($perp_day < 10) { $NewEntry .= "0"; }
7 $NewEntry .=
"$perp_day|$INPUT{'Add'}|$URL|$INPUT{'address'}|$I NPUT{'city'}|$INPUT{'state
'}|$INPUT{'zip'}|$INPUT{'phone'}|$INPUT{'time'}|$I NPUT{'FullText'}\n";


Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Thomas G. Marshall | last post by:
This message is sent to these newsgroups because they are no longer valid: comp.lang.java comp.lang.java.api comp.lang.java.bugs comp.lang.java.misc comp.lang.java.setup comp.lang.java.tech
5
by: titan0111 | last post by:
#include<iostream> #include<iomanip> #include<cstring> #include<fstream> using namespace std; class snowfall { private: int ft;
5
by: Krisnamourt Correia via SQLMonster.com | last post by:
I have one query that executes many times in a week. I created one Maintenances plan that Rebuild all index in my Database that has been executed at 23:40 Saturday until stop finished at Sunday. ...
3
by: Kate Luu | last post by:
I have down load some source codes from the internet and it wasn't worked right, but I'm really know what's wrong about it. May some expert help me please...I'm deeply appreciated for your help....
0
by: georges the man | last post by:
The purpose: • Sorting and Searching • Numerical Analysis Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical...
0
by: Randy | last post by:
Hi everyone, I'm trying to fix something I've done wrong, or is it a bug? My CSS looks ok in DW 8 preview, IE/Mac and Safari, but Firefox 1.5.0.4/Mac doesn't display the right menu correctly,...
11
by: frankie_85 | last post by:
Hi everyone, I just made a simple code which is part of my assignment but I can't figure it out what's wrong with it. (always give me error messages) What the code basically does is: a...
14
by: helpfulmaid | last post by:
Hello, I want a function that when it detects the left mouse button is pressed down, will generate and cycle 5 random number/letter combinations as fast as it can in a printed space. If I let off...
2
by: Chedda | last post by:
everytime i try to compile and run the program, on the compiler it states on line where it says ofstream outfile("c:\\Users\\Michael\\Desktop\\Statistics.txt");#include <iostream> that theres an...
3
by: redcodeheaven | last post by:
Hello my teacher gave me an exercise to enter my name and 2 numbers the output must show the sum and the product of these 2 numbers and keep repeating the same procedure using a while loop till i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.