Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. That's a different problem than the first post, and different code. It helps if you actually explain the problem. It looks fine, according to the manual. http://book.cakephp.org/2.0/en/models/data-validation.html What happens when you enter a string that is less than 8 long? Don't forget to read the section on multiple rules. http://book.cakephp.org/2.0/en/models/data-validation.html#multiple-rules-per-field
  2. In your model, try changing 'Job.description' => array( to 'description' => array(
  3. Posted variables will be set even if they're blank strings.
  4. Jessica

    PHP Query

    Surround the $_GET in {}. And close your query string.
  5. mysql_fetch_assoc That script you found probably isn't very good, there's not much point in selecting a row you do nothing with other than the count, you would just do a COUNT() in the query then.
  6. That's just the result object, you need to then fetch a row. Which your script is probably already doing. Find the next time $result is used.
  7. You'd need to use AJAX for that. Check out jQuery. Moving this to AJAX forum.
  8. Jessica

    PHP Query

    Yeah you can't put them in the query because then it would look like '%'data'%' because the prepared statement adds the quotes for you.
  9. Uhm, are you trying to use JavaScript or PHP??
  10. Jessica

    PHP Query

    I'll move it. OP: What exactly is the problem? You're unable to type the word OR? Did you try using LIKE() with the Wildcard? (%)
  11. You are the debugger. Edit: However putting your resultant HTML into an HTML Validator might have brought this specific problem to your attention. I use a Firefox plugin that shows me immediately if my site has any errors.
  12. Try indenting properly and you might find it.
  13. Textareas don't have a value, you put the text between the open and closing tags.
  14. You're not giving us nearly enough information to help you. Where exactly is the problem?
  15. A. Use a while loop, look at the examples on the manual page for mysql_fetch_assoc B. what's the rest of the code? Does the query work okay in mysql?
  16. Then sure. (I missed the part where there was a new person posting.)
  17. There wasn't a put down in any of my statements. Good luck getting "help".
  18. Are you really only trying to store the YEAR?
  19. He said to use it just before the query. If you want to create a really long string in PHP with all the calls to escape_string within it, you can. If you want to do them immediately before the query, you can. But do it when you are ready to actually use the query, not before then.
  20. That's a lot more complex than your original requirement. Making a field required is not the same as validating the value within in. A contact name also sounds to me a different thing than a username. *shrug* If you can't explain what you want it's not surprising you can't get it done.
  21. "by" is a reserved word in MySQL. You should either change the column name (preferable) or use backticks around it.
  22. I would use a class on each of the items instead of listing them out like that. And move the event.preventDefault() to the very beginning of that function, instead of the end.
×
×
  • 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.