Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5530

ukndoit on "access mysql - inserting records, updating records and deleting records"

$
0
0

I have a few employees.

1 creates files for the other to download and use.

I have made it where they can put the files into a directory and then when the other employee see's them, they click it, it passes them that file then moves it to another directory.

That all works. My problem is, if I hire another employee, that won't tell me which employee got which file, it can quickly get chaotic...

So I thought about this.

How about I create a table, so when Employee #1 adds files it not only puts them in that directory where they can access it, but I will have a "ticker" on that record. When it gets downloaded, it would mark that ticker, so we would know it was downloaded. I can also have it update who downloaded it and on the date, time and which computer they were on, well IP address anyways...

So instead of just having PHP scan the directory for files, I can have it just check the database for records that are not 'ticked'...
for the ticker that could be just a field named dl, with only values of 0 and 1, and 0 is default, once they download it, I could switch it to 1... and update the other stuff.

So my question here is, I can create the table from PhpMyAdmin, but how do I access it from inside wordpress, since my employees login to our wordpress site?

I just need to know how to access the tables, how to read and write to it. But I cannot figure it out.

Can someone point me in the right direction?

Thanks,
Richard


Viewing all articles
Browse latest Browse all 5530

Trending Articles