Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2014
    Posts
    6

    Unanswered: phpmyadmin default value

    I have an hotel search form with these fields: arrival,departure,rooms,adults,children.(last 3 fields are select list)
    I created a table in phpmyadmin with the same fields, so when I click on submit the table should get populated with this data
    and I should be able to see it with phpmyadmin.The problem is that for the last 3 fields I get a message saying that I must specify
    a default value or it will not work.Since I have to choose how many rooms, adults and children.what value should I indicate,if I put
    1 it works but only if I insert 1 room,1adult,1child.If I put 2 same thing 2 of everything which is not right.It should accept the values I
    select but it doesn't. Can you help me? Thank you.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You're missing some really important details from your question such as:

    - your exact table definition (SHOW CREATE TABLE your_table)
    - your PHP code that tries to write to the database
    - the exact error message produced (if it suggests an error on line N, you'll also need to tell us which line in PHP this refers to).

    With more information we can help. At this stage it would just be guesswork though.
    George
    Home | Blog

  3. #3
    Join Date
    Oct 2014
    Posts
    6

    phpmyadmin default value

    Hi sorry for replying late I was away for a couple of days and thank you for your help. Luckily the problem solved itself, what I mean is that now works beautifully I can insert different values in the select options and no problem. The only thing I can think of is that I deleted all the temp files, ran disk cleanup and from Internet options I deleted all the cookies, history etc. could that have been the solution? Anyway now is solved. I'll need some more help though as the project I am working on is very difficult for my limited knowledge. For instance I can insert the dates of the reservation in the textbox and it works.But if I use a popup calendar it does not work because the time format is different from what phpmyadmin accepts, what can I do? Of course I can forget about the popup calendar if I cannot solve this. Thanks a lot and excuse me for taking your time.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Not sure if that solved your problem because I don't know how your project ties together. It seems unlikely but not impossible.

    As for your date format issue: always pass dates in the format YYYY-MM-DD HH:MMS. This is a pretty universally accepted format.
    George
    Home | Blog

Tags for this Thread

Posting Permissions

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