Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. In your initial query of efed_content_booking, you should make that an inner join to the efed_list_eventstatus table. This will allow you to access the status value. There are various left inner join syntaxes that can be used with Mysql. This one is probably preferred at present. Note, that you didn't tell us what the name of the "status name" column is from the efed_list_eventstatus table, so I guessed it might be named status_name. Obviously this needs to match what the actual column name is in the table. SELECT efb.*, ele.status_name FROM `efed_content_booking` efb LEFT JOIN `efed_list_eventstatus` ele ON efb.status_id = ele.id
  2. You do not need to make username the primary key. You can simply set it to have a unique constraint, or define a unique index on username. You can then add a column called "id" or "checknumber" and define that to be the primary key/ with auto_increment.
  3. You have a limit in your query. That could be limiting the number of rows you return.
  4. This is really one of those one sided situations where there really is no gray to it. Basically you have someone who has contributed nothing to the community and only taken. Along the way, that person has acted rudely, and also been stupid and impetuous. For example, posting a thread knowingly in the wrong section, and claiming it's because it's the only way to get seen, is simply foolish and ignorant of the way that many of the veterans use the forum. Many of us use the "Show unread posts since last visit" button, and we see posts, regardless of what forum they are in. Certainly there are forums that generate less interest but that is usually because people are simply not interested in the subject matter, or aren't well versed in it. I actually find that we have outstanding coverage of a wide variety of material, but for example, a question on using php with Oracle isn't going to get the same number of responses that a post on php with mysql will, because there just are far fewer people with any direct experience using Oracle with PHP. Childishly deciding to go against the rules, and willfully posting in the wrong area, shows a complete lack of respect for the staff here, who volunteer their time and expertise. Sorry but I just don't see any reason for anyone to kowtow to some smartass, who decides to offer up a poorly written FU, and expects some type of apology or positive response to his "you suck and I'm leaving". Sure we could lie, and pretend to care, but in my experience, the OP will certainly not be missed. Contrast that with another poster who questioned the deletion of a Topic. As it turned out, the topic was deleted because the mod thought it was a duplicate, when in fact it was a subtle variation. There was a mea culpa and even an apology, and the entire incident was handled respectfully and with the utmost civility. I think that speaks for itself, when the question of how staff deals with the rest of the community on a routine basis is concerned.
  5. Believe me when I say, that this is much appreciated.
  6. I appreciate you bringing it to our attention, and being courteous and understanding about it. It's great to have people like yourself in the community.
  7. Thorpe, At least in my case I always did it with Centos/RHEL. Other distro's may be flakier. I also found that packages were often broken, hence the reason for my rather involved howto. If you can do a clean install on bare metal, that's pretty much a no brainer, as you just get the iso, pop it in and follow instructions.
  8. gizmola

    Installing SVN

    I hate to say this, but in most cases it's best to start out and learn the basics with the command line. Getting a repository setup is often the trickiest part initially, and in some cases there's no good way to do it with a gui frontend.
  9. gizmola

    Installing SVN

    Because Linus built Git to support the specific requirements he had for people working on the Linux kernel, a centralized repo would never work. FWIW, Linus originally used a system called BitKeeper that he was very happy with for many years, however, the developer took the product commercial, and eventually Linus and the Linux team went searching for a replacement. He was influenced by several other vcs systems at the time including monotone, when he developed Git. At the simplest, the focus of svn is to be a centralized repository for use by a team. When you make a change and commit it, everyone in the team, from that point forward, will have access to your changes. When you do work on a team, this becomes a bit of a conundrum, as to when to commit a change. The general rule of thumb in most teams is: "Commit when you know your change works properly and will not break the application." Some people go so far as to automate this, so that any changes must first be run through an automated build system that tests to make sure everything works, before the changes are accepted. Right away, this limits interaction with the version control system. For example, you might be working on a file locally, and not be ready to commit, and in your testing you change various things over the matter of a few hours. You do some testing -- things are looking good, then you decide to change something else *only to find that these changes are completely wrongheaded*. Here is where the philosphy of local repos like Git give you an advantage, because you can go back to previous states in your local repository *which were not committed to the master repo*, if in fact there is a master repo at all. Git is by no means the only vcs that provides a local repo approach. Another alternative vcs worth looking at is mercurial, which is used by a number of well known projects including Mozilla. In my opinion, Bazaar is currently the best modern vcs. Bazaar plays nice with svn, and is also used by Ubuntu and MySQL. There's some nice command line notes on bazaar use written by my friend Phil Larson http://phillarson.blogspot.com/. While we're SVN bashing, I can just as easily bash Git http://doc.bazaar-vcs.org/migration/en/why-switch-to-bazaar.html Last but not least, there is nothing wrong with starting out with svn and learning the use of it. In fact, many development companies use svn, so learning it can be helpful if at some point you're looking for a job. You can later transition to Bazaar and continue to use your svn repo. I think it's helpful to understand how svn works, and how it does what it does. I'm not sure that the notes work by themselves, but I did publish notes on a presentation I gave on the topic of using svn for web development. I also provide links to the most important resources. In the article I show how to create an svn repo and how to do basic operations. http://www.gizmola.com/blog/archives/88-Lampsig-2008-Presentation-on-Subversion-for-Lamp-Developers.html
  10. Ok, but did you read the part where I talked about ORDER BY? As I noted, a simple ORDER BY will sort the rows. You can then fetch them in a loop using PHP. First row in, 2nd row out, etc.
  11. Your program is free to "consider" the data to be anything you want. It seems that if you get a specific result set, which you haven't really specified in terms of your approach, and you were to fetch rows from that result set, you could then do your IN/OUT processing through alternation in a loop. What you plan to do with those values is also unclear. In simplest terms, if you were doing this through the entire database of these rows, then you'd want to at very least ORDER BY EmpNo, DateSlashTime. This will default to ascending order, so you'll get the rows in the date/time order you desire. The problem with these apps is always that if someone doesn't clock out, you have to do something logically to clock them out. And of course this is also a design that won't handle people who might work a night shift that goes across days. A much better design would be to have the clock table include an "EventType" column where it represents "In" and "Out" values. Then you simply start with an "In' row, and look for the first corresponding "Out" row which has a datetime > than the "In" event. This goes a long way towards makeing both problems I mentioned go away. I also have an article I wrote that you might find helpful on the use of CURDATE() and NOW() in mysql for use in limiting date ranges in an "Aging" type of application, which is what this sounds like. http://www.gizmola.com/blog/archives/51-Exploring-Mysql-CURDATE-and-NOW.-The-same-but-different..html
  12. Yes. What you want to do is change the opacity of the element using css or microsoft IE specific filters. The code is quite complicated however, and you can find pre-canned effects in most of the various javascript libraries. There's no particular magic to it -- you simply need to have a fadeout() function that increases the opacity of a css style until it reaches 100. There's an excellent article with several examples and the nuts and bolts of this here -> http://www.itnewb.com/v/Cross-Browser-CSS-Opacity-and-the-JavaScript-Fade-Fading-Effect
  13. You've created an array, so you simply reference it as an array element. var obj = {2:{"name":"Test for number 2", "other":"yup"}, 4:{"name":"What i want!", "other":"yup"} }; var test = 4; alert(obj[test].name);// Would say "What i want" var test = 2; alert(obj[test].name);// Would say "test for number 2"
  14. If you're going to run this as a workstation, I would agree with Ubuntu. You might also want to consider Gentoo, which takes a fundamentally different viewpoint from most other distros, in that it seeks to compile everything rather than go with pre-built packages. You will no doubt learn an enormous amount from either distro, and they both have excellent community support. It's probably worth saying that Ubuntu is based on Debian.
  15. I have a lot of experience with virtualization, including UML. As others have stated, in running a VPS you are already running a virtualized server. As your host is most likely running Virtuozzo, your guest OS, is not going to be able to be modified. You really need your own server for doing this type of thing. Purely for hosting and stability, OpenVZ has turned out to be a good platform -- I am a longtime member of a coop where we share hardware and hosting costs, and run instances under OpenVZ. For years we did this under UML, but it was far less stable than we wanted it to be. In many ways UML is a great testing tool. With that said, if I was going to do this on my own server, I would use either Xen or VMWare Server. Xen in particular is used extensively (*cough* Amazon AC3 *cough*) and now come built-in to a lot of distros. Here's a How-to I published a while back, when I was doing Xen setups extensively. At the company I worked for at the time (a well known telephony services company) we ran a number of servers under Xen and they were exceedingly stable and performed excellently. http://www.gizmola.com/blog/archives/75-Xen-3.0-Fedora-Core,-RHEL,-Centos-4.x-How-to.html
  16. The advice the other people gave is good advice. You have to identify what type of chips go into your machine. There are a lot of 3rd party memory companies like Kingston that basically sell memory chips, and they usually have a system that lets you put in the make and model number of your computer, and will identify what goes into it. I'd take a look at Crucial, Kingston and Newegg. Although Newegg isn't a memory company specifically it often has good pricing.
  17. Let's go back to the last known issue you had, which was the "virtual memory low" error. This is not a good error to have, as it indicates 2 things: 1. You were close to running out of virtual memory, which means that programs were going to crash due to out of memory errors. 2. You have so little usable ram that your system is swapping running programs to disk. First off, you should look over your settings. How much virtual memory do you have configured? Second, 2 gig is half of what you could have with a 32 bit machine, and these days, especially if the machine is old, you might be able to double the available memory for little to no money, be either adding new memory chips or completely replacing the ones you have with higher density chips. Photoshop in particular will use a variable amount of memory from the heap, depending on the size and bit depth fo the images you are working with. It is quite easy for you to exhaust memory simply by opening a number of large images. Just because you got illustrator and photoshop open once, doesn't mean you'll not have problems once you actually start to do work. Of course you could have other issues, and this could be exacerbated by the fact that you're using two monitors, although a good deal of that would be related to the video cards themselves. One known issue with 32 bit machines is that they take can take a bite out of the total avilable memory of 4gb, but in this case you already have stated you don't have 4gb to work with.
  18. Here's an article that discusses this issue in some detail: http://www.mc2design.com/blog/php_self-safe-alternatives. Ok... so I have to admit I airballed on this. $_SERVER['PHP_SELF'] doesn't include the query string. Disregard my prior comments on that. What I meant to say was that it includes the path, but this could include a bogus path, which is why this is vulnerable to XSS. Sorry for the confusion.
  19. It was deprecated long ago, and only works with Register globals on, also deprecated since 4.2. So apparently smerny is running on a server where register globals is turned on.
  20. My mind is just boggled here. $_SERVER['PHP_SELF'] is the name and path of the currently executing script, along with the full query string. If you had a $PHP_SELF, that was being created somewhere in your script. There is no variable named $_SERVER['php_self']. Could a $_SERVER['php_self'] be injected? Yes, I have seen frameworks and code doing that sort of thing -- going through the superglobals and injecting copies with the name lowercased. I don't think that's a great idea, but it can be done. Regardless, it would have the query string.
  21. So I'm assuming that what you meant was $_SERVER['PHP_SELF']. There is no such thing as $PHP_SELF alone. If you look at the rest of the $_SERVER variables, there is this one: $_SERVER['SERVER_NAME']
  22. I think this sounds like the right solution for your requirement -- will make the files transparently available on the XP machine. Performance should not be an issue, as this looks and feels just like any fileserver mount.
  23. I don't think you understand -- we're looking for the actual code. That is not the actual code is it?
  24. What is the mysql data type of the column named date?
×
×
  • 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.