i got data return from mongodb and as i searched i saw that i cannot user cursor twice so i put all data in arrays and now i need to split the data to unique name, the data i got : what i need to accomplish is to get unique names and push Data return for each name like that:
Fetch specific rows from MySQL with datatables
I’m trying to fetch specific rows in a MySQL table with specific “basket_id”s and display them in the jQuery DataTables plugin. In the PHP server-side script for the DataTables AJAX request, I specify the $user->basketId() in a WHERE clause for MySQL.. Let me walk you through it.. User si…
DVWA setup – PHP function allow_url_include: Disabled
I am setting up a DVWA on a Linux VM in Google Cloud. When I click Create/Reset Database, one line that appears to have issues is PHP function allow_url_include: Disabled. I’ve tried enabling it in the php.ini file inside the cloned dvwa repo, as well as /etc/php/7.3/fpm/ and /etc/php/7.3/cli/ directori…
Nested comment system runs too many queries ( laravel & livewire )
I’ve built a nested comment system and it works fine, but I have a problem. when I want to show the comments, it runs too many queries. for example if I have 10 comments and two replies each, laravel debugger shows 40+ queries, and I want to reduce them, here is my code : Query Relationship in Post.php …
How do you style input that PHP posted with a CSS selector?
I want to create a webpage that posts onto itself text inserted into an input field, using CSS to stylize said text once it becomes part of the page. However, I don’t know how to refer to it with a CSS selector. I’ve done what every HTML-newb tries when encountering a problem and wrapped both the …
Bulk move 130,000 post content value to a custom Filed in wordpress
My current blog already has 130,000 pieces of data, and the content of each of my articles is a number.The content body of all articles is a number。 I want to batch transfer the content field value to a new field named ‘views’. I used the method of this tutorial Never succeed with below message Fa…
WordPress huge whitespace within elements content output by php
I’m currently experiencing a strange issue in WordPress where certain elements will output the value a variable, but with huge amounts of whitespace around the text. To illustrate say my element is output like so: (var_dump() of $price results in ((string(12) “from £55.00”))) will result in …
Get the final price with discount but only if column is not NULL. SQL
I use these sql tables with these columns: customers: id name phone adress etc.. 1234 Test Name Test Phone Test Adress etc data. orders: customerid orderid orderdate 1234 OR_1234 2022-1-1 orderitems: (in this table one customer can have multiple rows(items) id orderid productid 1 OR_1234 P1 products: producti…
nginx – cURL Error: getaddrinfo() thread failed to start
I’m running a WooCommerce shop and have a Laravel system that retrieves data from our ERP system. This part works just fine. The Laravel system compares differences in products and push out all changes to WooCommerce (product updates and so on). When I look at the log, many of these API request replies …
Doctrine ORM: Ignore all events with persist and flush
I’m working on a system which uses doctrine/orm 2.6 (PHP 7.1 & MySQL 5.7) and am trying to update a large number of entities using the following code: The issue I’m running into is that the entities have lots of lifecycle events registered (preUpdate, prePersist, postUpdate, postPersist), and …