For my panel I update my “status-buttons” with count-numbers. F.e. New 2, backorder 5, cancelled 3, shipped 201 In the back, I now count them like this: I know… “Use prepared statements”… I will, in the updated version of my script 🙂 But is there an easier way to get all th…
Tag: mysql
Parsing a boolean expression into a MySQL query in PHP – part 2
I am coding an app for a friend, and SQL is not my strong suit. I thought that I had laid this matter to rest with my previous question, which received an excellent answer. However, my friend has moved the goal posts yet again (and swears that it is final this time). Given these tables The user inputs a text
Could you help me understand this PHP code with a PDO query? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question Good colleagues, I am learning PHP a little more thoroughly since I am a bit newbie, I alread…
How can I add more categories to the | select * from users, and more
I am currently having an error which I do not understand how to solve it and the truth is that I have been trying since yesterday and I do not get any solution. Could anyone help me please? FILE: topics.php FILE: db.php FILE: edit.php ERROR: Fatal error: Uncaught Error: Call to a member function bind_param() …
Laravel how to check if at least one column value is true or false
How can I check, if at least one of a bunch of checkboxes is checked/true? I’m using Laravel 5.8 My query right now: So far this works, but “only” returns an array with each value. Like this: I need some kind of value that tells me : is-checked: true/false – something like that. How ca…
I Have A Problem In Laravel File Upload. How To Get Original Uploaded File?
I Upload MS Word Document (.docx) in Laravel Using <input type=”file”> My MS Word File is Automatically Converted as (.file) Format While Storing in storage/app/public How to Again Download Same (.docx) Formatted File? ApplicationController.php Add-Application.php Image: Saved File Propertie…
Why I cannot update the data?
original data echo data upated data does not updated into databse Controller Update I got the id from the form and pass the value to show the data on the next page. It will show certain data based on the user click which row button. Model Update I have passed the id when updating the data, and It will not
Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
I’m trying to use a prepared array in a PDO query. I have the following code : This give me the following error : Uncaught PDOException: SQLSTATE[HY093]…(same as title) Usually I would execute my query like this : but this time the array is built dynamically. (I put it in this example how it’…
SQLSTATE[42000]: Syntax error or access violation: 1072 Key column ‘proform_id’ doesn’t exist in table
After php artisan migrate:fresh I get error: SQLSTATE[42000]: Syntax error or access violation: 1072 Key column ‘proform_id’ doesn’t exist in table (SQL: alter table proforms add constraint proforms_proform_id_foreign foreign key (proform_id) references proforms (id) on delete cascade) This …
Symfony Imageboard post database schema
I’m making imageboard in symfony. I am curios if I’m doing it in the best way. There are threads and posts just like in normal forum. Thread 1 post 1 post 3 Thread 2 post 2 post 4 The problem is I made two entities Thread and Post. It’s easy to get all posts from one Thread but there are