Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6345019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:44:38+00:00 2026-05-24T20:44:38+00:00

I tried both $query = INSERT INTO reservation VALUES (‘.$hour.’,’.$minute.’,’.$day.’,’.$month.’,’.$year.’,’.$name.’,’.$table.’); $query = INSERT INTO

  • 0

I tried both

$query = "INSERT INTO reservation VALUES ('".$hour."','".$minute."','".$day."','".$month."','".$year."','".$name."','".$table."')";

$query = "INSERT INTO reservation VALUES ('$hour','$minute','$day','$month','$year','$name','$table')";

But none of them work, I get a blank page, and no errors in my error logs. I tried doing echo to all the variables and I got their values.

Here is the overall function:

function makeReservation($trtime,$hour,$minute,$day,$month,$year,$name,$table,&$db)
{
//$query = "INSERT INTO reservation VALUES ('".$hour."','".$minute."','".$day."','".$month."','".$year."','".$name."','".$table."')";
$query = "INSERT INTO reservation VALUES ('$hour','$minute','$day','$month','$year','$name','$table')";
$result = $db->query($query) or die(mysql_error());
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:44:38+00:00Added an answer on May 24, 2026 at 8:44 pm

    I’ll make a few suggestions. First, I’ll assume that you actually know what you’re doing when you say there is no error.

    1) Make sure you work on the good database. You can do a SHOW TABLES query to see what tables it contains, or a SELECT * FROM reservation to see its content.
    2) Right after you insert the row, do a SELECT * FROM reservation query and check if your row is there.
    3) Make sure you call your function…

    Then, as I said in comments, you should use the DATETIME type instead of using different columns for hours, minutes, etc. If you need to select a particular attribute, use the appropriate function (for example, SELECT HOUR(your_column))
    The quotes around integers shouldn’t make your query fails, but it’s still better for clean code purposes to remove them if not necessary (and make sure you escape your data correctly, of course).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having a problem with this query, anyone know the problem? INSERT INTO options (grouptogether)
Into a MYSQL query, I am trying to insert a WHERE clause (the one
I tried both JRSwizzle, and MethodSwizzle. They compile fine on the simulator but throw
I've tried both of the following: repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.1 repo init
I am using Grails 1.2.x (Tried both 1.2.0 and 1.2.2- same behavior) I am
I created a simple test with SendKeys, and tried both SendWait and Send. Private
I tried using both ReadProcessMemory() and WriteProcessMemory() in my application,but in both cases I
I've tried this both with and without the 'ExceptionType' parameter. I have an Error.aspx
I've tried various editors, both desktop applications and web-based RTEs, but have not found
I have tried setting a line-height for sIFR3 in both the sifr-config.js and my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.