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 5846789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:37:35+00:00 2026-05-22T12:37:35+00:00

$db = new mysqli(‘localhost’,’x’,’x’,’rock’); $q = $db->query(INSERT INTO names (name,surname) VALUES (‘jack’,’daniel’)); var_dump($q); //

  • 0
$db = new mysqli('localhost','x','x','rock');

$q = $db->query("INSERT INTO names (name,surname) VALUES ('jack','daniel')");

var_dump($q); // boolean true

echo $db->info;

doing everything as described in manual but still returns nothing.

  • 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-22T12:37:36+00:00Added an answer on May 22, 2026 at 12:37 pm

    If the insert statement is one of the below info function will return result

    INSERT INTO...SELECT...     
    INSERT INTO...VALUES (...),(...),(...)  
    

    And your insert is not satisfying this condition.

    you have

    INSERT INTO names (name,surname) VALUES ('jack','daniel')

    if you change this to insert more than one record you will see the result from info function

    if you change your insert query to insert multiple record in once you will get result

    Try with below

    INSERT INTO names (name,surname) VALUES ('jack','daniel'),('jack2','daniel2')

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

Sidebar

Related Questions

$mysqli = new mysqli(localhost, root, , test); $mysqli->query('PREPARE mid FROM SELECT name FROM test_user
What's the ASP.NET equivalent of this PHP code? $db = new mysqli(/*some data*/); $db->query('INSERT
MySQL connection in PHP can be established in two ways: $mysql = new mysqli('localhost',
$mysqli = new mysqli(localhost, user, pass, db); $sql = SELECT OrgNo, CompanyName FROM ematch
I have the following script: <?php $mysqli = new mysqli('localhost', 'user', 'password', 'database'); $statement
I have following mysqli configuration settings on a separate file: $mysqli = new mysqli(localhost,
I have the following function <?php error_reporting(E_ALL); ini_set("display_errors", true); @ $dbh= new mysqli('localhost', 'root',
public function insert_data($array){ $db = new MySQLi(HOST,USER,PASS,DB); $var = adam; $stmt = $db->stmt_init(); $query
I am new to mysqli, and trying to confirm that if I so something
Whenever I try to create a mysqli object, as in; $mysqli = new mysqli(host,

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.