Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. No one feels like downloading all those files. Post the code that relates to:
  2. In your query you only SELECT "users.username" & "forum_replies.message", so that's all you can access. I don't see where you're echoing out $avatar2. The $location2 looks correct, but I see where the query or code for that is.
  3. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=329453.0
  4. It's not the correct code, but the code you have is acting appropriately. Like I said, you need to use something like mysql_fetch_assoc, pass it in the resource, and extract the information. Click the link to the manual and you will see a variety of examples. This is actually a PHP Coding question, I will move it there. Post the relevant PHP code.
  5. That's actually the correct way your code should be acting. If you look in the manual at mysql_query you will see the method returns a 'resouce' which is what is being outputted. You need to use something like mysql_fetch_assoc to extract the actual data.
  6. You're missing a comma between your table names.
  7. chris, please use in the future.
  8. Did this thread just turn naughty?
  9. For future reference we have a mod_rewrite section, I already moved your thread there.
  10. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=329439.0
  11. Steven, You have asked for a critique and that's what you got. Please don't take it personally, many of the comments and suggestions are perfectly valid and helpful. Let's not turn this into a blood bath.
  12. I think this error usually means you're missing a quote, or mixing them up. Can you post a few lines above and echo out $sql to see what the actual value is? Another thing I mentioned before, is if eventid is not and integer you will need to change it to (added single quotes): WHERE eventid='".$_GET["eventid"]."' LIMIT 1");
  13. So did you even make an effort to figure this out?
  14. Did you change your code or something...?
  15. lol... I think he did
  16. Does it give you a line number?
  17. If your column type is other than an integer then you need single quotes around the value.
  18. Maq

    Hello

    Hi Mike, welcome to the community.
  19. Now, when you call this function, unless you specify the $where parameter to be "FALSE", it will include the WHERE clause. function OverallGrabInfo($username, $where=TRUE) { if($where===TRUE) { $set_query = mysql_query("SELECT COUNT(d.username), u.date, u.username FROM uploads d, users u WHERE d.username = '$username' AND u.username = '$username' LIMIT 1") or die(mysql_error()); } else { $set_query = mysql_query("SELECT COUNT(d.username), u.date, u.username FROM uploads d, users u") or die(mysql_error()); }
  20. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=329370.0
  21. Briefly looking over your code it seems that the file you're trying to upload is not one of these extensions: '.jpg','.jpeg','.gif','.bmp','.png'
  22. Yes.
  23. Use double quotes, otherwise, unless you concatenate, the variables will not interpolate.
  24. If you store the date/time in your DB then you would just ORDER BY date DESC LIMIT 1
  25. I was told that you can do if/else functions without braces, they said it could be an improvement for code. o.O That only works if you want the block to only include the first line directly below it. It will throw a fatal error if you run it the way your blocks are set up. Thanks This is now solved. You could have just hit the Auto Solve button ;P
×
×
  • 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.