i am using mysql database and i have built a booking form for my website by default the booking states is pending. Once i have rang them and booked a time and date with them it changes to booked but in my admin site. I want to be able to click on the page that shows the booking info that stored in my db but i only want to show the pending clients info not the booked is there away to do this using php or would it be easier to move the booked info to a different db table
sorry about my writing skills i not every good with put what in my head down on to paper well computer in this case
Related
I am in the final stages of building my website and I am getting a little nervous that I am doing something wrong with my database.
I am building a Laravel/mysql site that allows users to add events. So I have an Event database. I allow users to choose dates for their event for next six months. That means one Event can have around 180 event dates which I save to a separate database called Shows. Each of those show dates can have tickets and the prices(vip, general etc) in a Ticket database. That means for just one event, it could create a huge number of entries.
event(1) -> show on every day(180) -> 5 ticket types(900 entries in my tickets database)
As far as I can tell this is the correct way to do it, but it seems like my Ticket database is going to get massive quickly. I will be using Elastic Search to filter through the data.
My company uses a barcode scanner to scan computers in rooms for inventory purposes. We scan a barcode on the door of the room and then scan a barcode on each computer.
I have created my own Access database that imports the records and then let us track our computers in each room and track additional non-inventory information about them - like type of computer (computer lab or Admin computer), date it was moved to another room, who the computer belongs to if it is an admin computer, etc. I would now like to scan each computer twice - one scan for the inventory code and one scan for the Dell Service Tag barcode.
I end up with a table that looks like this:
03/14/18,15:00:15,03,117SE
03/14/18,15:00:23,01,Z0820167
03/14/18,15:00:27,01,9MR8S52
03/14/18,15:00:34,01,Z0820168
03/14/18,15:00:39,01,9MQMS52
03/14/18,15:00:47,01,Z0820148
03/14/18,15:00:54,01,C6RLS52
03/14/18,15:02:29,01,Z0820138
03/14/18,15:02:32,01,C6RMS52
The 03 record is the room number scan from the barcode on the door
The 01 records alternate:
The first row is the Inventory Tag that starts with the Z
The next row is the Dell Service tag which varies.
The rows then continue on to the subsequent computers
I would like to combine the Inventory tag record and the Dell service tag record into one record for each computer. I can figure out the logic to determine what kind of record each record is (inventory or service tag) but I am unsure of:
How to take the inventory code from 1 record
Then take the same field from the second record that has the Service tag
Combine the records putting the dell service tag in a new field
Then moving onto the next set of records until the end of the table
I would like to end up with a table something like this:
Date Time Room Inventorytag Servicetag
03/14/18 15:00:15 117SE Z0820167 9MR8S52
03/14/18 15:00:34 117SE Z0820168 9MQMS52
03/14/18 15:00:47 117SE Z0820148 C6RLS52
03/14/18 15:02:29 117SE Z0820138 C6RMS52
I am limited by our corporate inventory guys on how the scanner is configured I can change the data format. I will import the data remove the dellservice tag records and then output the txt file in the format that they need for the inventory system.
So far I have done all of my data manipulation using VBA and SQL queries.
So I want to make this work. Any ideas!!
I'm relatively new to Access and VBA but I have managed to get some basic VBA tricks working in both Access and Excel. Now I've got a challenge that I can't seem to crack. I'm building a database to track maintenance of a small trucking fleet. I've got most of the tables and forms I need to do the basic tracking and management of equipment and maintenance in place.
One of the things we're tracking is called PM's which stands for preventative maintenance (lube jobs and oil changes). We do those on calendar intervals for trailers and mileage intervals for tractors. Right now, I'm trying to get the calendar tracked equipment working. I've a table called tblEquipmentMaster which is where all the specifics for each piece of equipment is kept (make, model, year, VIN, etc) and that table has a field called LastPMDate. All the maintenance records go in two other tables, tblMaintenance which records the unit number, vendor, invoice date and invoice amount and tblMaintenanceDetails which records the each line item of work that was performed on the unit (i.e. replaced water pump, replaced headlight etc).
The maintenance details table also contains a drop down list of standard maintenance codes to allow for easier searching of certain maintenance items later. One of those codes is PM. I also have several forms built to interact with these tables including a data entry form for adding new maintenance records.
What I'm trying to accomplish is to have the LastPMDate field for any unit number in tblEquipmentMaster automatically update to match the InvoiceDate field in tblMaintenance anytime an invoice is entered for that unit number which has a line item containing the code PM.
I've tried building an update query to do this but in addition to changing the LastPMDate field like I want it to, it also ends up changing the invoice dates for all previous PM invoices to the date of the last invoice which contained a PM. Not good.
So my question is, would an update query be the best way to do this or would I be better off with some sort of VBA solution? I have an add record button on my maintenance invoice data entry form which users use as a save record/clear form button when all the info for an invoice has been entered. I'm thinking some VBA code tied to the on_click of that button which would look at the invoice you just added, determine if it contains the PM maintenance code, then update LastPMDate field for that unit number with invoice date from that invoice would be a good way to do it but I honestly have no idea what functions or methods I'd need to get that to work.
Any insights or suggestions appreciated.
It's very hard to follow the flow of what you are describing, even if I have experience of PM and AM (Autonomous maintenance).
What is lacking is the relations between the three tables.
Nevertheless I prefer VBA solutions (maybe because I started programming when everything had to be written...). With VBA you can finely control your workflow.
If I understood well the 1st table is tblMaintenance in which you have the Invoice data.
Then you should have to scan the tblMaintenanceDetails to find the list of PMs and filter the tblEquipmentMaster with current PM value to update the LastPMDate with the date of the 1st table.
Did I succeed in providing you an idea to solve your problem?
Let me know.
One of our team who maintains subscriber content in CRM requested a report that displays total number of active records, email subscriber and email unsubscribers. I can create a report that shows current total for all three subject above. But can't show the historical details.
For example: Active used count for yesterday was 400K then today 403K and tomorrow 4007K, I want to produce a graph that shows the climbing of these numbers by day.
My first thought is to create new entity that stores all these details or a new table in sql and use that in reporting with SSRS.
I want to know if you guys have ever come across this and if so what you think is the best solution?
try once Group by date (Or)
Create a new Entity and write a workflow that runs every day and stores all the counts date wise.
fetch the custom entity data into the report.
Here is what I want to do. I am setting up a new commerce website for myself using WooCommerce. From each sale I will be donating $5 to a charity. In the header of my Wordpress site I want to have a counter that shows how much money we have donated in this current week.
So how do I get the required number from the WP database? I guess I need to some how extract the number of sales from the database, multiply that by 5 and put it in the header.php with a $ infront of it.
I don't mind if I have to change code at the beginning of each week to reset the counter.
Simple solution store a value of number of sales, create a wordpress option and increment it in the process of making the sale.
Otherwise you need to look more into the db structure of your ecommerce code and perform a count query of all records between today - 7d and today.