
Genexys
-
Posts
4 -
Joined
-
Last visited
Community Answers
-
Genexys's post in Class PDO not found in var/www/html/ was marked as the answer
Thanks! I've already solved the problem which was simply because I have two different directory in which there are extensions ,I just specified the one that appears in phpinfo page and all errors were gone,now I simply need some help to add videos path into mysql db to make a streaming website...well that's not the right section(^^) but since you're the only one that answers me,see you in the coding help section to give me some tips!
-
Genexys's post in How To add media Files in a mysql database via PDO class? was marked as the answer
Forget that I get it now, I wanted to delete the topic but since someone else can face this issue one day I'll explain what to do:
You just store your files' path one by one in the the db
Ex: Lion.jpeg
INSERT INTO table_name (column_name)
VALUES ('/dir1/dir2/dir3/Lions.jpeg');
Then let's say a user make a search on your website to find this particular item
You just concatenate the user's entry to a select query
$query = $PDO->query('SELECT * FROM <table_name> WHERE 'File_path' LIKE '%userInput%');
Then there you go you can use this path ($query) to do whatever you want with