Jump to content

mysqli_query failure not providing errno


cearlp
 Share

Recommended Posts

Two identical php programs doing a mysqli_query, but on different databases. One succeeds and the other fails. The one that fails returns no errno.

Could the cause be the databases?

If so, what could be the problem? They are real similar in construction, one has more fields than the other, but almost the same data in both. 

$conn = use, passwd, database

$sql = insert into members (name,addr,city,state) values('Joe','123 St','Somecity','CA')

$result = mysqli_query($conn, $sql) or die (Can't run query because " . mysql_errno());

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.