Create a table with logs [closed] - php

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 7 years ago.
Improve this question
My quick question is that I have a table that records users relations: userRelations(id, userID_1, userID_2, relationshipType, dateCreated). Now how do I create a log to see what was changed? Or by whom? Most of it is done php and then inserted into the table, but which columns must I have ?
EDIT: My difficulty was to understand the process of making a log, how to record, what to record, how many tables and such, I couldn't think clear enough to organize and say "This is what I need"

Create a new table that is updated each time this table is updated with the following headings
id,
userRelationsid (or shorten this if possible),
updatedby,
updatedrelationshipfrom (or shorten this if possible),
updatedrelationshipto (or shorten this if possible),
dateupdated,

Related

Is setting picture names to dates of their creation in the database the best way to name pictures so that they'll be unique? [closed]

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 11 days ago.
Improve this question
My goal is to add pictures inserted by user into a database. So I'm trying to set their names to the date of their creation. The format is "day.month.year hour.minute.second". But I'm facing the problem that the only one picture is added to the catalog. I'm thinking that the reason why it happens is because the script runs too fast for a second to pass.
And that made me think if this is a good idea to name pictures this way.
I started to assume that maybe I need to use some kind of library to manually add a second to every next picture's name.
But before doing that I decided to go ask somebody more profecient than me in order to undesrtand whether I need to do it this way or maybe there's a better one

How can I create a list of top donors using php and mysql? [closed]

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 1 year ago.
Improve this question
I would like to know how I can create a list of top donors, in which the user who donates the most is in the first position of the list.
In order to donate, you must be logged in
How can I do something like that using php and mysql?
This is only how much i understand your question.
First you need to create table for donors which the storage of their data, and 2nd is to make table for donate which holds the donator.
Then to sort the donator by donated the most, just use COUNT sql query to get the highest donate number.

Need to handle large database [closed]

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
I am having table with 9 columns and 400000 Records. I am using php and mysql for database. The problem I am facing is it takes quite a long time to fetch the particular data or search the records. So can anyone please suggest me should I use other database or some twicks to do in database and also sugegst me the best hosting to handle this large records in my site.
this much record is not considered as a large data. What you need to do is make sure you have proper indexing in your table columns and most important to load only those data which are required. i.e. Implement paging.

Responsive Tables and mysql [closed]

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 5 years ago.
Improve this question
First of all I must say that I am a complete rookie at web development(2 months working on). So forgive me about any "stupid" comments or questions.
I have a table which holds date stored in MySQL database. I use a form to send these data to the table.
My question is:
"Can I create a hyperlink on each ID of the table so when I click on it, it will display the data of the record BUT on the same page?"
All I could do was to display the table in another page.
First when someone read "responsive table" normally we think on responsive design, maybe the correct title would be data managament from tables.
To answer your question, I would say yes, you can create a hyperlink on each ID display the data, this hyperlink would make another query on the database, the way you want to do i would use AJAX that's really complicated at start, so I recommend you to search some tutorials.

Keeping CMS history or not? [closed]

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 9 years ago.
Improve this question
I have a database / systems question.
Say you have a CMS system done in PHP and Mysql
When you have users who edit their details, do you just update their row with the changes or do you keep a history for example by updating their row by setting the column 'status' = H (For History) and insert new row with all the old & new changed details with column 'status' = A (For Active) and that becomes the primary row?
I would just like to know what other developers do?
I'd keep a history for audit purposes but I'd move old records to a history table to prevent problems with primary ids. I wouldn't keep old records in the same table as current, that's just too much redundant data.

Categories