Jump to content

Kays

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Kays's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. When I need to, I will use it. I don't generally use it for scripting languages though. gdb and Eclipse are the ones I've used.
  2. INSERT INTO `final_list` ( SELECT * FROM `subscribers` S WHERE S.id NOT IN ( SELECT U.id FROM `unsubscribed` U ) ) Naming your table `final_list' is not very informative. Also, you may want to do a bit of research for INSERT ... SELECT before you blindly run the SQL above. And if you do, don't run that on a production system first time. Also, a LEFT JOIN work just as well and it is more efficient.
  3. Please address all of the following: 1. Post the Items class. Redact all sensitive information. If it is really long, post it on pastie.org and provide the link. 2. What's in require('includes/item-brains.php');? Redact all sensitive information. If it is really long, post it on pastie.org and provide the link. 3. What is the value of $_GET['listid']?
  4. If you could tell that, could you also narrow it down to 1 line? Libraries should be loaded in head. All else in end of body. The reason is that if you stuff all your scripts at the top, it can slow down page load times. Since the browser has to parse all of them before it gets to the important HTML that you want the user to see. So placing them at the end helps that. But libraries should to be at the top because you may want to call them anywhere within the page.
  5. It's easy. Just add a ON DUPLICATE KEY UPDATE to your INSERT. But you will need a unique identifier to the record in the DB. Otherwise, it wouldn't be a duplicate entry.
  6. It looks fine to me. You don't have to open and close all those PHP tags. Open one tag and put all your PHP code in between. If you are the ONLY person that would use that code, it's fine. However, if you have other users use it then: I will point out that you should RARELY trust your own input data to be secure. So please don't take on blind faith that the users won't try to break your system. So please secure your $_POST data before passing them on. Still, even if you are the only one using it, it's not a bad idea to secure them.
  7. judejitsu: if you want the information like "Start Station" then you may need to section your file into groups. Since your file has very little consistency, you may need to handle each one. Barand's code should work fine for those cases where you have a ':' in the search string. The rest are in a table-like format and it may not be quite as easy.
  8. You want to only update values that are modified right? If so, smoseley may have misunderstood. In that case, you'll have to check each field and update each one accordingly.
  9. Structure it using a MVC model. Since you are redesigning your site anyway.
  10. You'll need to utilize JavaScript for that.
  11. 1. A hidden input field next to each entry should work. 2. JOIN
  12. Yes, you're trying to include_once list.php twice. You had a /* (assuming you commented out), but you weren't in PHP mode and are in HTML mode. so that /* */ didn't really comment it out. You cannot comment out PHP from executing with <!-- HTML COMMENT --> so don't try it.
  13. Kays

    VC?

    Based on just what you have: 1. Better to name it class.* instead of *.class.php. 2. A controller shouldn't have a _getDBH() function. Makes more sense to have the model do whatever functionality you need. 3. Views shouldn't return a JSON encoded $data. Just display it on the spot. It can be pretty messy (and annoying) to look at any data that's in string format when you want to debug it later.
  14. Where is the sgid3.php? If that is the same file, then the answer is obvious. The information is being passed to the PHP file, but you're not doing anything with them. Have a read: http://devzone.zend.com/6/php-101-php-for-the-absolute-beginner/
×
×
  • 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.