Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
It's possible create code can delete data in table after specific time given from user using php and pdo or something similar and how i do it?
public function delete_time($thedata,$time){
}
Your question is a bit vague and so my answer must be vague as well, but I believe you can do what you want using the Event Scheduler. You can create a SQL statement to schedule a query (such as a DELETE) to run once or repeatedly at a future time:
CREATE EVENT future_delete
ON SCHEDULE AT <timestamp>
DO CALL my_delete_procedure(<param1>, <param2>);
I should imagine you could wrap this in a stored procedure that you could then invoke from php, passing bound values for <timestamp>, <param1>, <param2> &c.
Hope that's of some use to you.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am little new to PHP, MySQL and web development. I have seen MySQL Views are "Virtual Tables" and can be used to represent data table virtually. And my problems are,
Are there any performance increment when we use MySQL Views in a PHP 7 MySQL application?
Are there any security increment?
Can we use MySQL Views for JSON REST API requests?
As far as I know. The view is like you save a query to a database. So you can save time to write a complex query.
I think yes. Because you can grant users access to view rather than directly to the table.
To get the data is yes, but a function like edit and delete I don't think so.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In order to find websites with potential sql injections, it is possible to use google dorks like "inurl:.php?id="
From the results that google will give, does it mean all the websites listed use sql database (mysql, oracle or any other)?
As it is a backend call, we can't exactly say, that it related to a Database as well. The reason is that while captured based on $_GET['id'], the returning value can be decided only upon the backend, solely based on PHP. So SQL connection is not essentially needed in that purpose.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Suppose I want a webpage containing only a tick box. I wanted it to be possible for anyone to change the value of the tick box, and then the value to update for anyone checking the page, would I have to use a MySQL database? Or is there a better way to do it?
You want a really simple thing. Of course you can use a database like MySQL for it, but it is seriously not needed in any way. You just have one value, so you could have a text file with that value and it would work too. It depends on what data you want to store.
A database is good because it offers you for example things like the query.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am making a web app using PHP. I want to place event triggers on the database.
I have the triggers wriiten. I have no Idea where to place them so that it is executed.
A trigger is written like you write normal sql queries.
For example :
Create mysql trigger via PHP?
Where are you using it though?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
The problem is that I must catch situation when some variable (and I don't know it's name, that is I don't know where this value first arises) matches some record in database. The way I think it could be done is to run after each statement an external code against array of local and remote variables. In that external code would be a simple foreach loop and db query, the script would then output line number where given situation happened.
Is this possible with xdebug ?
There is a function for that, http://php.net/manual/en/function.register-tick-function.php more documentation on ticks is http://www.php.net/manual/en/control-structures.declare.php here.