Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. See a little way down this page: http://au2.php.net/ternary It's the ternary operator.
  2. Ajax requests are no different to any other request as far as PHP is concerned.
  3. isset returns true or false, it will never equal $i. <?php for ($i=1; $i<=30; $i++) { ?> <option value="<?php echo $i; ?>"<?php echo isset($_POST['petsAge']) && $_POST['petsAge'] == $i ? "selected='selected'" : ''; ?>><?php echo $i; ?></option>"; <?php } ?>
  4. trq

    r/nr/rn/r

    r/n/r/n means nothing in PHP or SQL. You will need to post your code and a better / more accurate description of your problem.
  5. i mast write SQL with out `` thanks Pardon?
  6. If you use a selector framework you can easily locate elements via class selectors. jQuery and many other frameworks provide this functionality.
  7. This is pretty standard practice so I would say yes, it's fine.
  8. Where is the code you are having trouble with?
  9. Naming variables beginning with $ won't interfere with jQuery, it would only interfere if you used $ alone like jQuery does.
  10. You do your sorting in your query. This has nothing to do with php. SELECT fld FROM tbl ORDER BY some_fld;
  11. I would suggest you misunderstood the tutorial or it was poorly written. You cannot insert a string into an integer type field.
  12. You posted your question in the "PHP Applications" board. Hence, you need to tell people what application it is your working with so that people who have worked with said application can offer to help.
  13. I meant what protocol is the server? Web sockets are implemented using HTTP. Sorry, I don't really collect links but you should be able to find something on Google. You would probably be better implementing this in a language more specific to the task though. JavaScripts Node.js comes to mind, it's perfect for such things.
  14. Sorry, i didn't notice your example was an INSERT query. Most people don't use that syntax for an insert. Anyway, It's not called "auto increment" for nothing.
  15. What sort of server? In general, the server will lock unless it is written to accept multiple connections/requests.
  16. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=350480.0
  17. As I said, you only need to update the fields you actually want to update. Trying to set an auto incrementing field to an empty string "" will only cause an error.
  18. You need to check it is null within the template where the actual data is displayed.
  19. Your not inserting any data so there is nothing to escape. And no, just update the columns you wish to update.
  20. UML isn't really tied to a particular language.
  21. Nope. I'm currently at work and haven't really got the time to look at the links provided. I guess I'll check it out when I get home. You forget that I live in Aus. there's not much that happens in the U.S that I'm interested in.
  22. You might want to let us know what application it is your actually using.
×
×
  • 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.