show PDF Resume field

Questionsshow PDF Resume field
James T DiGiovanni asked 5 years ago

I have a mysql table, students. One of the fields is a blob field that contains a PDF of their resume.
Will gridphp be able to show the resume field in the table? I deally, I want the user to click on a record and have the pdf open.

3 Answers
Jim answered 5 years ago

Just to be clear, I do not want to upload files via gridphp. The pdf files are already in the MySQL db and I want to display them in a grid. Show as a link and have them open it.

Abu answered 5 years ago

Hello,

Apologies for the late reply.

Yes, both things are doable.

You can display link that will open / download blob,
and upload blob in database as well.

Sample code:

https://gridphp.com/demo/demos/editing/file-upload-blob.phps

Trackex SAS replied 2 weeks ago

I get next error

Couldn’t execute query. Column ‘fcontents’ cannot be null – insert into filecontents (fname,fcontents) values (‘Captura de pantalla 2024-11-02 091649.png’, LOAD_FILE(‘/home4/trackexm/public_html/sistema/intranet/temp/Captura de pantalla 2024-11-02 091649.png’))

What is wrong ?

Trackex SAS replied 2 weeks ago

Apparently the parameter $p does not have the value

// insert in db as blob
$g = new jqgrid();
$g->execute_query(“insert into filecontents (fname,fcontents) values (‘{$data[“params”][“fname”]}’, LOAD_FILE(‘{$p}’))”);

Abu Ghufran Staff answered 2 weeks ago

Looks like the LOADFILE function is returning null. Here are the possible reasons.
https://stackoverflow.com/a/24459279/385377

Test it in phpmyadmin first before using in code if the following query works.
insert into filecontents (fname,fcontents) values (‘Captura de pantalla 2024-11-02 091649.png’, LOAD_FILE(‘/home4/trackexm/public_html/sistema/intranet/temp/Captura de pantalla 2024-11-02 091649.png’))

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

0 + 0 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?