Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. They're about 3 years too late on that rewrite.
  2. Neither situation is ideal. Using a mysql query per user is more reliable because the basic memory constraint would be the total number of users, and you actually don't need to fetch them all into an array first -- you can fetch a row then issue the aforementioned query. You do want to make sure you have an index on username, created.
  3. phpBB has been around for so many years, and dates back to the early php4 days, possibly even as far back as php3 when php oop was pretty minimal and had weird gotchas. Due to its popularity, it's been a frequent target of attacks, and i seem to recall that at one point phpf ran on it. It will probably continue to stumble forward for years to come, purely due to its brand name and notoriety, but yeah.. the code is certainly not a thing of beauty. With that said, often the code in opensource projects lacks consistency especially as years go by and the original people tire out and get replaced with others. I think there are times when a project really just needs a reset.
  4. Is there an index on the time column? What do you get when you do EXPLAIN EXTENDED SELECT FROM `chat_logs` WHERE `time` How many rows are being deleted? What engine is the chat_logs table using?
  5. It's a lot of work, but it can be gratifying and satisfy your desire to give something back to the world at large. Github also provides free hosting + git, and then there's good old sourceforge. The hosting is really the simplest part of it -- it's more writing it, creating documentation and examples, and dealing with bug reports and patches. There are plenty of places to promote your project starting with freshmeat, and communities that focus on the tech stack you're developing for.
  6. You should also look at http://www.adminer.org/
  7. No php required: will get result one username. There is no query that could do this for all usernames at once, afaik. (select * from activity WHERE created UNION (select * from activity WHERE created >= CONCAT(YEAR(NOW()), '-', MONTH(NOW()), '-', '1') AND username = 'theuser')
  8. The same functions that you would use to convert (note Pika2k's suggesting of STR_TO_DATE for example) can be used to do the queries you're doing above. They potentially will be quite slow because every single row will have to be examined to see if it fits the criteria, as mysql can not utilize an index in a case like this. Yet another reason to bite the bullet and convert, but it needed to be said that STR_TO_DATE can facilitate those queries even though it requires table scanning.
  9. I will assume you know how to make an html img tag. An image is a file. Here is the relevant page for building an upload form file-upload Typically people store the filename or a link to the filename. I'm going to assume you understand how to use mysql to update a column in the profile row. Sometimes they may need to resize the image to fit constraints. You can use http://us.php.net/manual/en/book.image.php or http://us.php.net/manual/en/book.imagick
  10. You send what you want to send, but you also need to keep track in code of what changed in the row. In other words, this is a feature of the php code you write, not something built into mysql.
  11. It is possible that on your old host a default database was configured so your code did not need to issue a mysql_select_db(). Take a look at the scripts/connect.php script, which looks like it has the mysql database configuration code.
  12. Along with what jcbones wrote, the reason I alias the same table with two seperate join names is so that you can tell which is the home and which is the away team name, which was your original problem as I read it. This page can be daunting to look at, but if you go down to the examples, you'll see similar constructs which might help: http://dev.mysql.com/doc/refman/5.1/en/join.html
  13. Also if you really want someone to try this out, make a sql dump of the tables -- people can't be expected to reverse engineer your schema.
  14. You should have enough of a hint now to work on this on your own.
  15. Rewrite your query using the mysql join syntax: http://dev.mysql.com/doc/refman/5.1/en/join.html. This will allow you to alias the connection to test_teams with 2 different aliases. Something like this is what you want to do: SELECT tf.competition, tf.date, tth.team as hometeam, tta.team as awayteam FROM test_selections ts LEFT JOIN (test_fixtures tf, test_teams tth, test_teams tta) ON (ts.userid = '{$_SESSION['userid']}' AND (tf.hometeam = ts.teamid AND tth.teamid = tf.hometeam) OR (tf.awayteam = ts.teamid AND tta.teamid = tf.awayteam))
  16. What is the complete .htaccess file? is there a subdirectory named /valeting in the directory?
  17. I have tested the current phpmyadmin 3 on the ipad and it doesn't work too well, especially the table view. There seems to be at least one useful app for the ipad from impathic (just search mysql in the app store) but you can have it cheaper. http://www.adminer.org/en/ Setup is very easy and the simplistic interface works great on the ipad. Thanks for the tip on that looks like an interesting alternative to phpMyAdmin.
  18. This is 100% debugged and verified to work. I changed email addresses in my test to send to a number of email accounts. I also cleaned things up and eliminated some spurious spaces and things that broke the multipart in gmail. Webmail readers are notoriously picky about these things and the version I started with did not parse correctly in gmail. An extra space after the part separators is enough to throw things off. The main thing I noted is that you have a bad habit of being inconsistent -- for example, you put /r/n in front of some headers and after others. That sort of practice is going to lead to a hard to debug error, and of course you missed little things like having no
  19. No problem. Topics are not a scarce resource here
  20. Please make a new topic for this, as you have moved onto an entirely different problem.
  21. Well what I mean is that you need to use either a variable named $header or $headers, and use that throughout the script.
  22. You have a typo in your code --- you set $headers, then append to $header. Probably your first variable should be $header = "From....."
  23. Everyone needs something. This is a forum for people who are practicing or learning PHP based web development. Are you planning to build this feature yourself? What do you need it for? Do you have some code? The example captcha is really bad as a captcha btw. Why not use recaptcha or some other proven library?
×
×
  • 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.