Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=341329.0
  2. Whenever I hack the CIA, NASA, or whoever I want, I usually use my trusty - Low Orbit Ion Cannon.
  3. Maq

    help

    We got that from your title. Post more of the relevant code. Are you selecting this from a DB? If not, how is this array being generated? Usually caused by an invalid query. Again, post more relevant code.
  4. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=341253.0
  5. Can you run it in a regular script? If it doesn't work specifically when you run it in cron then it's probably permissions. I don't see any DB connection credentials either.
  6. If you really want to make your own, see how SQLite does it.
  7. Probably because your query is failing? You need to learn the concept of variable scope. I have some questions: - Why can't you pass in $sticky_kw as a parameter to the sticky() method? - Where is $query coming from? - How do you know your query is NOT failing? - If not, how do you know there are matches?
  8. Yes, that is a very common error. So common that we even made a sticky for it, check out: http://www.phpfreaks.com/forums/index.php?topic=37442.0
  9. Maq

    OOP tutorial

    The manual is good for reference and definition but I much prefer John's tutorials from PHPF to learn OOP in PHP.
  10. Hi and welcome!
  11. good call! I like that better You might run into a permission errors, I haven't really used shell_exec much so I can't really give any advice.
  12. Yes, that temporarily sets error reporting to max. So your header calls work fine locally and not on live? What does disallow mean here?
  13. Did you edit your php.ini locally to have error reporting turned to the maximum?
  14. Oh ok..
  15. Why don't you just use "rm -r" in the shell_exec?
  16. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=341225.0
  17. What?
  18. What in the world are you blabbering about?
  19. You should be testing locally with error reporting turned on to max. When you are testing your code/site you should catch and handle errors and exceptions appropriately. Also, look up unit testing for you application.
  20. No. mysql_query() returns the Resource ID, that's why you're seeing that as your output. Like I said, you need to extract the data using something like mysql_fetch_assoc. If there are multiple columns you're trying to output, try something like: $query="SELECT site_name FROM mtr_control_panel WHERE site_url='".$this->site->url."'"; $result=mysql_query($query) or die(mysql_error()); //outputs error message if query failed. take out when done while($row = mysql_fetch_assoc($result)) { echo $row['site_name']; }
  21. whiteboi, DO NOT double post, you should know better. I locked your other thread: http://www.phpfreaks.com/forums/index.php/topic,341078.0.html
  22. Don't double post. I'm locking this.
  23. Sure. Just remember that mysql_fetch_assoc, mysql_fetch_row, and function alike, return arrays of the result set. This means $row will be an array and you must specify which row you want by giving it a key.
  24. Looking at it again, do you really mean to have $row . $id . $row['0']? That would result in something like "array511". echo "{$row[0]}";
×
×
  • 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.