Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Yep. I would use double for the master string (for interpolation purposes) and singles for the attribute values. It's much cleaner and easier to read.
  2. If you can: then displaying details for the specific item should be similar. I assume you have these items in your database? For your link, pass the value via HTTP: itemDetail.php?id=5 then to extract the id in "itemDetail.php" you use $_GET: echo $_GET['id']; Now you should have enough information to extract all the information you need form the data base.
  3. What exactly are you having trouble with? You put this in the MySQL section, I can move it to PHP if it's more than SQL help. The pseudo design would look something like: - Display all the results with links that contain the unique ID. - When the user clicks the ID, send them to a page that handles inventory item details. - Use the ID to query the database for that specific item and extract the appropriate information and display it.
  4. LAST_INSERT_ID() is a MySQL function, not PHP.
  5. Try using - mysql_insert_id. Keep in mind you need a connection open.
  6. If I understand correctly, you want to use: http://dev.mysql.com/doc/refman/5.1/en/insert-select.html
  7. No problem. Maybe our Dutch user base will increase
  8. In addition to what ansharma said, your input field should look like:
  9. Because the name of your input field is "password" not "Tes_Description".
  10. It's not you. We don't allow users to modify their posts after a certain amount of time, not sure exactly how long though.
  11. eregi has been deprecated as of 5.3, you should not use this function. If $match is not a regular expression you should not be using any regex function. If you do need a regex function then use preg_match. If you just want to check if $match exists anywhere in the USER_AGENT then use strpos.
  12. You did not do what I said. What I said was to change this line to: $result = mysql_query($sql) or die(mysql_error()); The answer, again, is here: http://www.phpfreaks.com/forums/php-coding-help/total-unique-id%27s-with-php-and-mysql/msg1527874/#msg1527874 The order of your clauses are messed up. Read the manual for the correct order: http://dev.mysql.com/doc/refman/5.0/en/select.html
  13. Firstly, you have like 3 threads floating around with very similar questions. Please do not start duplicate topics, it is a huge waste of time. How does it fail? Did you append the or die() to see what the error was?
  14. Forgot about that, I replied in that thread too ;/ Here is the duplicate: http://www.phpfreaks.com/forums/php-coding-help/total-unique-id%27s-with-php-and-mysql/msg1527852/#msg1527852
  15. You already have the GROUP BY, just COUNT the number of conversation_id's.
  16. EDIT: What MaBiSmAd said.
  17. For a good tutorial of how to appropriately handle errors & exceptions, check out: http://www.phpfreaks.com/blog/or-die-must-die
  18. Usually that error indicates the query is failing. To quickly check if it is you can temporarily change this line to: $result = mysql_query($sql) or die(mysql_error());
  19. Maq

    pagination

    What's the error?
  20. The WHERE clause should precede GROUP BY.
  21. There are a multitude of reasons this could have happened. You could have CnP, edited with different editors, etc...
  22. (In the future, please use tags when posting code)
  23. Not sure exactly what you mean. Can you provide and example?
  24. It's more efficient to do this calculation in SQL than PHP.
×
×
  • 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.