Jump to content

zipp

Members
  • Posts

    51
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

zipp's Achievements

Member

Member (2/5)

0

Reputation

  1. I completely agree. That was just a bad comment
  2. That's not all base will be used for. I am only 0.5% done with this project, and I ran into a snag like that. However, I figured it out.
  3. No Thank you for the has/length idea, I'll work on that
  4. I have 6 files, and two of them do not seem to want to play well. I keep getting a "Cannot redeclare class" error. ** edit ** I know its these 2 files, because when i comment out the include for login.php, the error goes away. **end edit** The full error: Fatal error: Cannot redeclare class Base in \core\Base.php on line 7 Base.php <?php /** * Base.php is the base class for all functions. * */ class Base { function __construct() { include("Admin.php"); include("Feed.php"); include("Login.php"); include("Session.php"); include("SQLManager.php"); include("Twitter.php"); } function __destruct() { } } ?> Login.php <?php /** * Login.php is the class for all Application login functions. * */ class Login extends Base { function __construct() { } function Login() { } function Logout() { } function __destruct() { } } ?> All of the files that are included in the Base __construct, extend Base. Anyone have any ideas?
  5. **edit** I think I figured it out. I'm pretty sure the script was just timing out when displaying (to many items maybe). I'll limit it to something like 20 or so, just to keep it small. <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <title>**</title> <link>**</link> <description>**</description> <language>en-us</language> <pubDate>2009-10-12 07:57:54</pubDate> <lastBuildDate>2009-10-12 07:57:54</lastBuildDate> <item> <title>**</title> <author>**</author> <link>**</link> <description>**</description> <pubDate>**</pubDate> </item> <item> <title>**</title> <author>**</author> <link>**1</link> <description>**</description> <pubDate>**</pubDate> </item> (...this continues for 50+ items...) </channel> </rss> title: plaintext author: plaintext link: url, plaintext (no html) description: html (ex: check out this link: <a href="http://www.somesite.com">somesite.com</a>) pubDate: 2009-10-12 07:57:54
  6. I wrote a script to generate the xml in this format: <rss> <channel> <title></title> <link></link> <description></description> <pubDate></pubDate> <item> <title></title> <link></link> <description></description> <pubDate></pubDate> </item> <item> <title></title> <link></link> <description></description> <pubDate></pubDate> </item> ... </channel> </rss> There is roughly 50 items total. However, only the first 4 show up when the file is accessed in firefox, and Windows Live Mail says it is not a proper rss feed (my guess is because it is running on localhost). When you view the source of the xml file, all the items are there. Does anyone have any ideas?
  7. The # of values is always increasing (never decreasing) at a random rate. 5 a day, maybe 500 a day. Once the value is in the xml file, it will not be changed. However, it can be removed. Right now, I have the code checking the complete value against that in the database, but that is pretty slow.
  8. The values could be a lot longer (400+chars). Not just a single word like in my example. Sorry, that was a bad example in that aspect.
  9. What I am doing, is taking a xml file, and adding the values to a database. However, what I want to do is only add the new values. I am guessing that a script that compared the first xx chars of the xml value to the value in the database would work best. The script would be ran (in theory) once a day. Example: day1.xml <fruits> <fruit>apple</fruit> <fruit>pear</fruit> <fruit>orange</fruit> </fruits> day2.xml <fruits> <fruit>carrot</fruit> <fruit>apple</fruit> <fruit>pear</fruit> <fruit>grape</fruit> <fruit>orange</fruit> </fruits> Does anyone have any tips or code I could mooch off them?
  10. Hello. I am working on a project that could best be described as a "time card" system. It is so employees can clock in/out and submit their time cards after a couple of weeks. It is also going to have some admin features like manage employees, edit cards, view unsent time cards, view past time cards, mark time cards as paid, and some other little things. I am running into a problem trying to get my PHP scripts to work correctly with my database design. I am wondering if there is a better way to do things. Right now I have 2 tables. 1 for login info, and 1 for time cards. There will be about 20 employees. Do you think it would be better to have a table for each one? table1 unique id what time card they are on (will increase when they "submit" their card) login name password what position they hold at the company if they are an admin or not table 2 unique id employee id time card id punch in punch out paid vacation time (admin will set this manually) any expenses they need to add to the card any drive time they had if the card was submitted if the card was paid The problem I am having is that there will end up being 20 entries per "time card id" and I cant seem to get my PHP scripts to seperate them by "employee id". How would you go about doing this type of project? I would really appreciate any help you can offer. I can supply more details if it would help.
  11. Worked wonders Thanks. I tried the other one too, but he/she is right, its only the last value.
  12. I am trying to get a sql column into a php array, but I am having no luck with it. Does anyone have a code to do this?
  13. table format: id | f1 | f2 | f3 01 | a | a | 1 01 | b | b | 2 02 | a | a | 1 02 | b | b | 2 OK. I have a new problem. I'll try to explain it out here. I am trying to average all of the "f3 fields, where id = 01" Kinda stuck on how to go about this, anyone have any ideas?
  14. It's not solved yet, but if no one else helps me, then i guess its yours.
  15. Alright, I coded it up, now I need to fix the PHP end I believe. We shall see what happens next.
×
×
  • 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.