ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

On failure, 'mysql_query()' returns . . . . . . . .

Answer & Solution
Correct Answer: Option D
This question is about how MySQL tells you if a query was successful or not.
The function `mysql_query()` is used to send SQL commands to the database.
When a command runs successfully, it returns a special value.
When something goes wrong, it returns a different value to signal an error.
The answer: Option C (-1).
So, if `mysql_query()` returns -1, it means your query failed.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.