![]() |
Admin 9/14/2021 |
Modify your SQL query to concatenate all these fields together and setup this new calculated field as a QRCode. If you use MySQL check concat() function |
M
|
Mansour author 9/15/2021 |
this is not good solution bicouase it result will dispaly as a text in the other hande if i want to display invoice and the inovice number view as QR Code when i scan this RQ Code i have to see invoice details (all record in the invoice) |
![]() |
Admin 9/15/2021 |
It is very confusing. So you do not need to encode the text as a QRCode? You can calculate the URL of the View page of this invoice, display it as QRCode and when someone scans it they will be taken to that View page. |
M
|
Mansour author 9/16/2021 |
Yes this is solution may be work, but how to let the RQ Code mention to link? |
A
|
acpan 9/16/2021 |
From what @admin tried to suggest and what i think:
Generate the project and scan the QRCode, it will take you to the view page of the student data. Note: you need to ensure security check at Before Display event of the view page, if it is a public page without login. |
M
|
Mansour author 9/19/2021 |
Dera acpan, Thank you for your help, I think your solution will work good but i need the system generate this dynamicly |
A
|
acpan 9/19/2021 |
It should work out of the box on PHPR.
In your PHPR's SQL Editor: SELECT student_id, field1, field2, field3, CONCAT("https://xyz.com/whatever/student_view.php?edit1=", student_id, "&hash=", hash_value) AS QRCode_URL FROM student_table Where hash_value can be any "randomly generated" value stored or derived form the the student's data in DB.
Then go to List page and scan the list QR Codes and see if it takes you individually to the Students' View pages. I notice your question's objective has been changing along the way, it indicates that you have not tried anything nor understand how basic QRCode works in PHPR. So no point saying what if this and that, without knowing how. Try first without hash check and see if it takes you to the page. |
A
|
acpan 9/19/2021 |
If you are interested to implement some security check later, here's some idea: When QRCode is scanned, it takes the viewer to the Student's view page which look like this: You can implement some check: At the view page's Before Processed Event with the URL param passed. // exit immediately if no hash is passed // check against DB if hash is passed Where student_hash is a hash value created during student record creation. Above approach is for viewer with a login account, your_encode_function can be any encoding function, or simply use PHPRunner's built-in generatePassword() function. Update: Found out later that there is also an example about how to allow public access to view page using hash value. refer to this blog here |
M
|
Mansour author 9/19/2021 |
Thank you for your help again about your question "I notice your question's objective has been changing along the way, it indicates that you have not tried anything nor understand how basic QRCode works in PHPR. So no point saying what if this and that, without knowing how. Try first without hash check and see if it takes you to the page." my question's objective has changed along the way becuase i am new start learning the QR Code and i dont have good knowledg . Thank you |
A
|
acpan 9/19/2021 |
No worries, this is my way of telling people, don't hesitate, try it and you will find the rope along the way, we all have gone through that too :) It will be easier to advise once you are onto it. |
M
|
Mansour author 9/21/2021 |
Dear Acpan thank you i appreciate your kindness help i am realy got a benift from your advise |