Results 1 to 5 of 5

Thread: Query Not Working

  1. #1

    Fla Box Query Not Working

    I have a query that I always use, and for some reason it isn't working, please check:

    PHP Code:
      $order time();
      
    $title=$_POST['title'];
      
    $maintext=$_POST['maintext'];
      

         
    $query "insert into pages
                             (title, maintext, order)values 
                             ('
    $title', '$maintext', '$order')"

  2. #2
    PHP Code:
      $order time();
      
    $title=$_POST['title'];
      
    $maintext=$_POST['maintext'];
      

         
    $query "insert into pages
                             (`title`, `maintext`, `order`)values 
                             ('
    $title', '$maintext', '$order')"
    use the ` quote (not sure what its called) around column names...

    You can never underestimate the stupidity of the general public.

  3. #3
    Quote Originally Posted by RvGaTe View Post
    use the ` quote (not sure what its called) around column names...
    accent
    Let us live so that when we come to die even the undertaker will be sorry. - Mark Twain
    Don't PM me your CSS, xHTML, JS or PHP questions. I will not reply to ANY IE6 questions.

  4. #4
    you don't need that... just try:
    PHP Code:
    $query mysql_query("insert into pages (title, maintext, order) values ('$title', '$maintext', '$order')"); 
    AS2 / AS3 / JS / JQUERY / (X)HTML / HTML5 / CSS / CSS3 / PHP

  5. #5
    Quote Originally Posted by Swooter View Post
    you don't need that... just try:
    PHP Code:
    $query mysql_query("insert into pages (title, maintext, order) values ('$title', '$maintext', '$order')"); 
    actually ... technically ... you should, because order is a reserved MySQL function. You should always try to put accents around your fields and tables, that way it fully qualifies them and your script will in no way confuse it w/ a function.
    Let us live so that when we come to die even the undertaker will be sorry. - Mark Twain
    Don't PM me your CSS, xHTML, JS or PHP questions. I will not reply to ANY IE6 questions.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012