The proper way to do this is with code similar to the following:
5. Why do I get an error that looks something like this: "Warning: 0 is not a MySQL result index in file on line x "or "Warning: Supplied argument is not a valid MySQL result resource in file on line x?