Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. who? client? lead-developer? I can't imagine either making such a choice on a project nor wanting such a responsibility to use an untested framework in production. script-kiddies will have your website for breakfast working their way through your entire portfolio and probably be done by lunch.
  2. From what I can remember from my VB.NET classes should this be the equivalent without all the internal validation ofcourse // $_POST['records'] = array([n] => <id>) $in = implode(', ', $_POST['records']); $query = "SELECT * FROM table WHERE field IN ($in)"; $result = mysql_query($query); if ($result && mysql_num_rows($result)) { while ($row = mysql_fetch_assoc($result)) { //do your processing here } }
  3. Arrays are the same in PHP4 & 5 Post your code
  4. UPLOAD_ERR_INI_SIZE Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini. Reading the manual truly helps http://www.php.net/manual/en/features.file-upload.errors.php
  5. What the hell is this? $sort2 = $_GET["sort"]; $_SESSION["sort"] = $_GET["sort"]; $sort = $_SESSION["sort"]; Shorter and easier to read: $sort = $_SESSION["sort"] = $_GET["sort"]; The same goes for: $dekleuris = $_COOKIE['uploadskleur']; $kleurachtergond= $dekleuris; $kleurachtergond = $_COOKIE['uploadskleur']; PS I know about "copy-on-write" still doesn't mean it can't be clean.
  6. The reason you are having a hard time is because your db has been badly designed: products ----------- product_id product_name company ----------- company_id company_name license ----------- license_id license_name product_id company_id license_numbers Your company can have many products but not each product may have a license. company --(1..*)--> product --(0..*)--> license products ----------- product_id product_name company_id companies ----------- company_id company_name licenses ------------ license_id license_name license_sum product_id Now you can query these by using: SELECT * FROM companies c -- use LEFT JOIN if you want to show up companies that have no products -- in this case the relation becomes company --(0..*)--> product JOIN products p ON c.company_id = p.company_id -- if the product has no license all fields for licenses will return NULL LEFT JOIN licenses l ON p.product_id = l.product_id
  7. You mean like http://httpd.apache.org/docs/1.3/mod/core.html#virtualhost ?
  8. JetBrains PhpStorm -> http://www.jetbrains.com/webide/
  9. And my response still stands CACHE your page (keep separate caches for both the song details and the comments) invalidate the comment cache upon receiving a new comment.
  10. Stop building your own framework (poor quality of code, probably untested, ..), avoid vendor lock-in and use Zend framework
  11. I believe __DIR__ is only available since PHP 5.3.x and more then likely he has a version <5.3 @OP DIRECTORY_SEPARATOR solves the slash thing include_once(rtrim(dirname(__FILE__), '/\\').DIRECTORY_SEPARATOR.'filename.php');
  12. What do you mean by setting up a website? Registering the domain name?
  13. I understand your question quite well you are worried about performance because you would hit the database with so many queries
  14. SELECT c.catid, s.subcatid, c.catname, s.subcatname FROM cat c, subcat s WHERE c.catid = s.catid
  15. On the other hand a sledgehammer would do fine to.
  16. $to="me@localhost"; Do you have a mail server running on your client?
  17. Do you mean something like? AND FK_Projid = (SELECT FK_Projid FROM tbl_gantt WHERE ..)
  18. This does assume your script will be finished reading all directories without hitting the memory_limit or the time_limit
  19. set_time_limit(0); ..read directory ..do stuff exit(0);
  20. That's why they invented caching
  21. notice 'now' while ($row = mysql_fetch_assoc($result)) { $start = new DateTime('now'); $end = new DateTime($row['end']); $interval = $end->diff($start); // replaces time_compare() if ($interval->invert) { echo 'Item Sold'; continue; } // these 4 lines replace your entire time_format() function with equal functionality echo (!empty($interval->d) ? $interval->d . ' days ' : ''), (!empty($interval->h) ? $interval->h . ' hours ' : ''), (!empty($interval->i) ? $interval->i . ' minutes ' : ''), (!empty($interval->s) ? $interval->s . ' seconds ' : ''); }
  22. IMO this suggested to the OP that PEAR::Mail notifies him whenever a mail is not opened/received while PEAR::Mail merely allows you to send your mail through something different then the built-in mailer like SMTP.
  23. No it is not as it would use the parameters in $_GET or $_POST. Anyway you can use one page for all songs as they all will look the same except will differ in content.
  24. My code would do the same: The second number is the number of players in each group Group 1, 0 Group 2, 0 Group 3, 0 Group 1, 1 Group 2, 0 Group 3, 0 Group 1, 1 Group 2, 1 Group 3, 0 Group 1, 1 Group 2, 1 Group 3, 1 Group 1, 2 Group 2, 1 Group 3, 1 ...
×
×
  • 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.