I learning mysql pdo requests and now came up to this: $query= "SELECT * FROM table WHERE name=:name"; $params= [‘:name’=> $name]; $result= $pdo->prepare($query); $result->execute($params); So, there are two questions. Does this code good enough or how to make it better? May be in one line or so. I use PHP to connect with mysql. Is ..
I am application a website using PHP, MySQL and PHPMyAdmin. I can store and retrieve images from it using ($_FILES) approach. I have a problem though, I want to know how I can store and retrieve audio paths from database and display it. The audios ARE NOT UPLOADED are RECORDED with record.js. I am struggling ..
I’m creating a filtering system with 3 steps and it works for now but now I want to have items with more categories. All category_ids are INTs. Do I have to change this or whats the best option to make this. This is my solution for now. So I have a column (redundancy) for separating ..
I am building an app in which i want to let users add an image in the database. How do i store it and access it later on the app? PHP please Sourc..
I use below command in the path of project for running php. php -S localhost:8000 But I don’t know how to access my database? thanks Sourc..
I need a bit of help here. My user’s table looks as below select * from users; id | full_name | email | first_name | last_name —-+————–+——————+——————+————— 1 | abcd — efg | [email protected] | | 2 | hijk — lmn | [email protected] | | 3 | opqr — stu | [email protected] | | Now ..
I’ve got two databases in the same server & i’ll define them to be database_nevada & database_zurich with a table name users holding exact same column names in each databases: -database_nevada.users -database_zurich.users I’ve created this trigger on database_nevada.users where every inserts to database_nevada.users table would insert the same row to database_zurich.users as well : This ..
2 files are always required other are optional using 4 different inputs When i uploaded 2 files the results are good. 2 into database and 2 into a folder but when i try 3 files the results are 3 into dabase but only 2 into a folder. $targetFilePath1 = $targetDir . $fileName1; $targetFilePath2 = $targetDir ..
So im trying to insert a time using an input text field into a database table with data type TimeFrom and Time To. The format of time that I want to insert should be like this: HH:MM am// example: 10:30 AM But the input of time there have am/pm option to choose but does not ..
Is it possible to just set a placeholder as table in a selection and then bind the table name with MySQLi prepared statements? I have 3 tables. Each would have the same function if it isn’t possible to code it with variables. My failed attempt: $data_table would be something like "blogposts". function functionname(mysqli $connection, $data_table) ..