Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Maq

    Buu!

    Hi radikaalz and welcome. You seem to know English better than some of the natives.
  2. You can echo it to the browser rather than returning the data.
  3. Of course. I can also play this game, in some other parts of the world $8/hr is not much at all Justifying the fact even more that one of the most biggest rate dependencies is based on location, which essentially is the cost of living.
  4. Why are you returning? Is this part of a method I'm not seeing? Run this code and tell me what it outputs. $tempvar = mysql_real_escape_string($_POST['variable']); echo "tempvar: $tempvar "; $sql = "SELECT * FROM tablename WHERE Code = $tempvar"; echo "sql: $sql "; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { echo $row['Description'] . " "; } ?>
  5. Good one.
  6. MySQL doesn't have a String type. Maybe you meant VARCHAR or TEXT? OP, if your query is returning all the records then there is nothing wrong with your query. For the second time, please echo $tempvar and tell us what the value is.
  7. The suggestions I proposed in my last post should suffice your needs. There are plenty of examples, have a go. If you need additional help, post back.
  8. Yes, but what are you saving towards? If you have everything you need and want, why do you need money? That's why I always look for something to upgrade, it gives me a reason to earn money Wait until you start paying bills, you'll see why.
  9. Using arrays for XML parsing is very inefficient. OP, I would look at simplexml or you can read this tutorial for more alternatives: http://www.phpfreaks.com/tutorial/handling-xml-data Hope this helps, although I'm not sure exactly what you mean by this:
  10. 1) Please use or tags around code. 2) Have you echoed $tempvar to see what the actual value is? 3) You must invoke mysql_real_escape_string on any input to the database to prevent MySQL injections.
  11. Hi Ryan, welcome.
  12. Glad it's working. Keep in mind, if you're using user input in your query you must invoke mysql_real_escape_string on the value to prevent mysql injections.
  13. I was thinking the same thing which led me to choose the dark blue and green.
  14. $result= "SELECT * FROM client WHERE client.name LIKE '%".$each."%'"; while($row = mysql_fetch_array($result)) should be: $sql= "SELECT * FROM client WHERE client.name LIKE '%".$each."%'"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) You should also add in some error handling. Read this blog for more details: http://www.phpfreaks.com/blog/or-die-must-die
  15. You need to provide the SELECT statement data to select. Read more here: http://dev.mysql.com/doc/refman/5.0/en/select.html
  16. You also may want to check out the heredoc syntax, in your particular case.
  17. What in the world are you doing? Put the results in a variable, not the PHP code.
  18. No they don't. The problem is that you're not SELECTing anything. Moving to MySQL Help section.
  19. Maq

    Music

    LOL
  20. Something similar to: SELECT COUNT(food) cnt, food FROM [table_name] GROUP BY food, ORDER BY cnt DESC; If you only want the top one, which seems to be the case, append "LIMIT 1" to the query.
  21. What made you ask this question? When developing, you should turn on error reporting and set to max: ini_set ("display_errors", "1"); error_reporting(E_ALL);
  22. A good laugh indeed. A truthful part I liked in particular:
  23. Must be a complex formula to come up with a DB name like that... Same, pure genius.
  24. Hi Brian, welcome!
  25. You also shouldn't handle errors that way. Read more here: http://www.phpfreaks.com/blog/or-die-must-die
×
×
  • 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.