How to delete the aircon in database when there is no any data. Order and Aircon are many to many relationship. Answer try whereDoesntHave Edit: You can also add new column aircons_count will old number of aircons for every order which will be faster than the above query and run the query like the following: …
Restrict live an input field comparing it to another field
I have a php page and these two inputs fields. My goal is to check if the second input is equal to first input (live) and make an error msg. The code i have so far is this: In the end of the php i have a Javascript checking: Its not working, as u understand. Any help ? PS. I’m
Cant run pdflatex command (Tex Live) on Plesk
I got a problem with an API (PHP) I created. The API should create a pdf document depending on the data that is sent. The script works perfectly, running it directly on Ubuntu, Plesk is running on. The part that is not working is the following: The tex-file seems not to be touched… no log files or anyth…
how to use Laravel 8 query builder like eloquent for searching
I’m developing a simple CRM with Laravel 8 that needs to search in query string. My query string would be look like: Now the problem is how can I search in controller? I want to do like this: I wonder why its not working and what is the standard way to do this. I’ve tried: but that didn’t wo…
Why can’t get query from sqlsrv ci3
//this my config db: ‘dsn’ => ”, ‘hostname’ => ’10.***.***.*’, ‘username’ => ‘username’, ‘password’ => ‘password’, ‘database’ => ‘mydb’, ‘dbdriver’ => ‘sqlsrv&#…
Upload an image from input to server using JQuery/Ajax
I have an Input like this: Now I want to send the image to the server (I guess ajax is the way to go?) From the Server I want to save the …
WooCommerce extend product search by custom product data field
I’m currently trying to extend the WooCommerce product search so that the search uses my custom field I’ve created within the general product data section: add_action( ‘…
SELECT COUNT with meekrodb Uncaught MeekroDBException
I would like to count the number of nums in a table from the associated idnr. However, I get the following error message: Fatal error: Uncaught MeekroDBException: If you use named args, you must pass …
How to use PHP code in inline CSS in HTML
I’d like to use my PHP code in Inline CSS. Let me show the code: This is my code: This is what I want to achieve: But instead, I get this: What can I do to make CSS read 22 from my PHP code? I want to change the width by changing the PHP code. By the way I’m using
Display items with id from an array
So i created a column in my database that accepts JSON array, inside these array are item id’s , i want to create a loop on those ids and insert it in an sql select statements to display all items that has the ids in the array, but im clueless on how to do it. Answer As you are storing