MySQL Forums
Forum List  »  PHP

Re: MySQL Query Using PHP not working
Posted by: Phillip Ward
Date: January 11, 2018 11:12AM

Quote

What is the mistake in the query as it doesn't seem to work and is there any chance I don't have the (user) privileges to call the time() function on the server?

1) What does the query look like before it gets executed?

Remember: SQL is a String that just happens to mean something to your database server. Always give yourself the opportunity to look at the assembled SQL before it gets sent to the database.
Or better still, use a Prepared Statement that will avoid this sort of "formatting" problem altogether.

2) What error, if any, do you get when the statement executes?

We're good around her (some way(!) better than others), but we're not psychic.

Quote

is there any chance I don't have the (user) privileges to call the time() function on the server?

If the rest of the PHP code is running, that's very, very unlikely.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL Query Using PHP not working
January 11, 2018 11:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.