Display hard coded content against value in MySQL database
- or -
Post a project like this1783
$25
- Posted:
- Proposals: 6
- Remote
- #2411290
- PRE-FUNDED
- Completed
FullStack Developer : React | Node.js | PHP | Laravel | Javscript |Redux | GraphQL | Rest Apis | Express.js
Faisalabad
9769254833981193039261890826755532697004
Description
Experience Level: Entry
We have developed a website where the general public is able to download a personality profile inferred from roughly 500 words they have written. The website is in development however we are having difficulty in creating the report page against the personality scores that are held in the database.
The viewport.txt file attached is the PHP page we are in the process of creating. When the page is created we wish to use PDO to generate a PDF file that will be mailed to the recipient.
In MySQL we would use a CASE statement to pull the data from the the database and display the corresponding measure in the report. The following would be the code we thought we would in the attached 'sample_case.txt' file.
The attached personality_score.csv is the structure of the table where we are pulling the data from. In effect we are wanting to do a CASE call against each trait and pull back the value, if the value is greater than 50 then the high value measure must appear in the report. Conversely if the value is less than 50 then the low value measure must appear in the report.
This is not working, and while we are able to get the statement to work under MySQL we are not having the success in PHP.
The viewport.txt file attached is the PHP page we are in the process of creating. When the page is created we wish to use PDO to generate a PDF file that will be mailed to the recipient.
In MySQL we would use a CASE statement to pull the data from the the database and display the corresponding measure in the report. The following would be the code we thought we would in the attached 'sample_case.txt' file.
The attached personality_score.csv is the structure of the table where we are pulling the data from. In effect we are wanting to do a CASE call against each trait and pull back the value, if the value is greater than 50 then the high value measure must appear in the report. Conversely if the value is less than 50 then the low value measure must appear in the report.
This is not working, and while we are able to get the statement to work under MySQL we are not having the success in PHP.
Robin M.
100% (22)Projects Completed
17
Freelancers worked with
14
Projects awarded
63%
Last project
29 Jan 2021
South Africa
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies