Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. You're missing FROM in your query.
  2. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=334030.0
  3. Exactly. Rule of thumb, usually if you can do it SQL, than do it in SQL. Of course there are some exceptions. This is what SQL & databases were designed for. If you have a table of 3 million rows you're not going to extract them all and see if ID = 1 with PHP, that would take forever, you're obviously going to do this in SQL. Again, don't really see how you can compare the two.
  4. Then I'm either missing something or simply don't understand. Could you provide an example of when it's difficult to decide which one to use?
  5. This question depends on what you're doing. They are used for 2 totally separate things, you can't really compare them.
  6. Like mjdamato said, your code is very confusing and hard to follow. It's going to be very difficult for someone to debug this code, especially since we can't replicate your testing environment. You're going to need to try and isolate your problem. Echo out the member id to see which one it stops on & also in the while/for/if blocks to see where it's breaking down.
  7. Good. Some side notes: - Protect against sql injections by using mysql_real_escape_string on $id. - Properly handle exceptions, in this case, for mysql. Check out this tutorial - http://www.phpfreaks.com/blog/or-die-must-die
  8. From an answer on stackoverflow:
  9. There's nothing to fetch when you're deleting.
  10. What exactly do you need help with? The basic gist go like this: Listen for each keydown event and make an AJAX call with the value of the search field. In your backend code do a sql search, return the results, populate the drop down.
  11. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=333939.0
  12. @smazharzaidi, do not double post. I deleted your other thread.
  13. This topic has been moved to PHP Math Help. http://www.phpfreaks.com/forums/index.php?topic=333872.0
  14. I think he wants to do this in the .htaccess.
  15. Yes that would work too but I'm not sure which one would be faster, if I had to guess, the MAX() function.
  16. Why don't you use the mysql MAX() function? http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_max And how does this relate to PHP exactly?
  17. Before going through all that code add these lines in and post the output: echo "QUERY-> " . $qry; $result = odbc_exec($conn,$qry); if (!$result) { echo odbc_errormsg($conn); }
  18. Look at Example #2: http://us3.php.net/mysql_query You need to loop through the result set, usually using a while loop.
  19. I haven't tried many different hosting providers but, if you haven't seen it already, here is "Web Host List" sticky: http://www.phpfreaks.com/forums/index.php?topic=117475.0
  20. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=333697.0
  21. 1) What happens? Do you get an error? Where does the script break? What have you done to isolate the issue so that we don't have to go through your entire codes. 2) In the future, please place tags around your code. 3) If you're having trouble connecting to the DB then it's most likely a PHP issue, I'll move it to that section.
  22. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=333684.0
  23. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=333650.0
  24. PHP keeps a change log including deprecated functions for each version. Here is 5.3.x: http://php.net/manual/en/migration53.deprecated.php
  25. The video told you to do that because eregi has been deprecated since 5.3.
×
×
  • 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.