Save Printed Documents Record in Database - printing

i have developed a program for printing student and staff ID Cards in PhP. i want to print ID Card and store in MYSQL database that the ID Card is printed how many number of times and on which data.
I try nothing as i have no idea and don't know what to do

Related

delphi freeze and activate order

I am trying to make small POS system, using FDMem table to fill items for the customer.
In case the customer forget his money or go to change a product .. and the customers in the line move and new customer shows up asking to start sale process, how can I save or freeze the current state of the FDMem table holding the products of the previous customer and start a new order and finish the sale. Then, when the first customer comes back, how can I resume the previous sales process and reactivate the previous FDMem table with it's items?
Add one more column in the FDMem table. That column could take 3 values: 'Finalized', 'Opened' and 'Paused' depending how the "status" of the sales is going. You can then navigate between the records.
So if I understand you correctly you want to be able to handle multiple customers or orders at the same time.
One solution one would guess would be to assign each customer unique number and them add that number as additional field to each record in your database. Now assigning unique values to online customers isn't particularly difficult. In fact you already have such information in form of session ID. But doing something like this for customers in a physical store is not feasible.
But there is another similar solution. Most Tax authorities require any shops to issue a receipt for any purchase made. And each of those receipts needs to have a unique number. So you could reserve a new receipt number when customer gets to your POS for the first time and you start adding its items to the system. Then you might want to have another table with all reserved receipt numbers and their current status, so you can know which receipt has been finished which one is still pending completion or which one was cancelled.

How To fetch value from one table to another table in one to many Relationships in Core Data?

How to access Balance value When Type Mobile Number?
Image is
Output Is
Enter Mobile No.Should be Return Balance Of Account Table.
Thank You

Unique random code for user content and how to avoid multiple user accessing same data in entity

Using swift 3 IOS10 and core data. I was trying to generate a unique code or ID for user content and I did not use UUID as it's too long I need short memorable one- I generated an alphanumeric code by doing this: created an entity to hold a start up numeric code say 1000, saved it to core data table and every time a new user comes in I read the code from the database, add some equation let us say addition to making sure it's unique, then add some random characters to it for more security. my question is how can I guarantee that if multiple users accesses this area at the same time they will not get the same code number read from the database. is there anything can block the DB record once any user reads it so prevent multiple users reading same data from the table at same sec?

Some questions about CloudKit

record type: Country(CKRecord)
--------------------
name: String
code: String
--------------------
record type: User(CKRecord)
------------------------
name: String
country: CKReference (reference to country record>
-------------------------
I have 2 record types (Country and User) created by CloudKit Dashboard. I encountered some cloudkit issues.
currently! I query User and then using country reference to fetch country record. When I using cloudKit to get some records
I have to do a lot of queries and fetches that waste a lot of time for waiting. so my issues are
1)How to get User record and Country record at the same time, If I query a record? example: query User Record
2)In some record that have a reference list. How to delete a CKReference in that reference list
Thanks a lot
In CloudKit there is no way to query 2 different recordTypes in 1 query. The only exception is when you already know the specific RecordId's. Then you could query for those ID's. So In your case, when you don't already know the User, you do have to do 2 queries to get the country record.
You could limit the number of fetches since you probably have a limited number of countries. At app startup just query all the countries and save them somewhere in memory, then when you do query for a user, you can get the country from memory. If you suspect that your country data will change frequently, then create a subscription so that you get a notification to update your data in memory.
If you have a reference list in your record, then query that record, remove the item from the list and save that record again.

How to save the contacts of the user in db?

I have a requirement where i need to save the contacts of the user and i have the following issues.
I have a user table where i would save the "user1" and i also the save the users in his contact in the same table.
And say another user "user2" has to be saved along with his contacts in user table. Consider "user2" has few contacts same as "user1"(i.e., the contact number is same but the naming is different). And i should not repeat the user who is already present. In this case i can check with contact number so if that contact number is already present i can skip saving the contact and use that id instead.
But another situation is, consider "user1" has saved his contact as "9999444494" and "user2" also has "9999444494" but they both belongs to different country say "country code +91 and +92 respectively" but it looks as if the contacts were same if they do not specify the country code and how could i get these differentiations and save it in the table.
I am stuck with this issue. Please help me. Thanks in advance.
There is no reason to assume that just because two people have the same phone number, that they will change that phone number at the same time.
Say your two users are employees of the same company and they give the main switchboard number as their contact number. When one quits the company their contact info will change but the other will stay the same. The same could happen if your users are members of a family who share a phone. When one leaves (child moves out, parents divorce,...) the contact numbers for each user will be different.
Therefore: don't try to rationalize contact numbers down to a single record. Repeated entries are not the same as duplicate entries when that repetition is coincidental.
Regarding country code, you need to include that in your contact information in either the same column or a separate column. If that country code is nullable then keeping it separately might be helpful so that you can see plainly that the information is missing.

Resources