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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:36:57+00:00 2026-06-05T03:36:57+00:00

I designed a simple web interface to a database on localhost. On the localhost,

  • 0

I designed a simple web interface to a database on localhost. On the localhost, if I attempted to send an SQL command to create a record, and used an invalid FK in one of the fields, then the PHP mysql_query returns false and I have my PHP script return the mysql_error() which of course has some info about the FK I tried to violate.

I moved the entire project to a HostGator account I have, and created the DB tables using the EXACT same SQL setup script. When I try to violate a FK here though, the mysql_query returns true, so my PHP script acts as if the request succeeded, which of course it didn’t.

In both cases, nothing gets inserted into the DB, but for some reason in the latter case mysql_query is returning true. Also in the latter case mysql_error() appears empty, even though clearly I’ve made an error.

Is there a server setting somewhere that controls this?

Thanks!

EDIT:

Similar issue, on the remote server I am able to delete a record which has FK dependencies. It seems the hostgator version is not enforcing referential integrity at all. 🙁

  • 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-06-05T03:36:59+00:00Added an answer on June 5, 2026 at 3:36 am

    As posted in the comments above, the correct solution here is to force my engine to InnoDB.

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

Sidebar

Related Questions

i designed a simple function to return a mathematical function which can be used
I'm working on a simple web app using jQuery mobile, and it is designed
It is easy to create a simple web app that runs in Elastic Beanstalk.
Hi I'm designed a web app to be used offline at my company. People
Background Looking to leverage an existing web framework to create a simple data-driven user
Let me explain the use case... In a simple python web application framework designed
I have a rather simple web-service which exposes data from sql server. It will
The idea is simple: create a web part page in SP Designer 2010 that
Tornado advertises itself as a relatively simple, non-blocking web server framework and was designed
i have a simple asmx page with one web method which return array of

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.