I’m trying to create a function to redirect users to the login page if they are not logged in for some pages, this is my code: As it didn’t work and I tried every simplifications I tried to add a print “hello” at the beginning of the parent and child theme functions.php nothing is prin…
Number of Posts – Display number (x of x), if number is less than 4 ( 4 is the post_per_page)
I am showing 4 custom post type posts per category on a parent post type archive page with category rows. I want to show the count of the category posts ($list->found_posts), but I am limiting the displayed posts to a random 4 posts. I have successfully displayed the total number of posts for each category…
Yii2, get an average value from timestamps
I have a basic table with orders, which have a field thats called created_at which is in timestamp format and I want to get the avarage on how many orders have been created per day. Found a other similar qestion about something like mine question whichI have posted below in the hope that everybody understand …
how to use properly OTRS GenericTicketConnectorSOAP in PHP
I am using PHP version 5.6 . I made a PHP form that have 3 fields, username,password and CSV file upload. The CSV file contains in every line two “number codes” the ticket number and the invoice number divided by “;” , so in that way the CSV have two columns. On the processing code tha…
How to pass `?` with url in laravel?
I am passing comments through the GET method, which contains special characters including ?. I am using the following code in route. Route::get(‘CustRequest/{id}/{comment}’, ‘ApprovalController@…
How can I improve CSV import faster in Symfony?
I have to import CSV file of around 20,000 rows. This CSV is read from FTP Server which will update every 30 minutes. But the code I have written is already taking more than 45 mintues to import. This is very slow. Can anybody please help me. I am thinking of persist the data every based on the batchSize =
How to retrieve certain data in string?
Hello may i know how to retrieve data in string? Output : As you can see the output of the code is as shown above. This is my first time to encounter this kind of output because usually I get json as the output. So my question is may I know how to retrieve the RESPONSE_MESSAGE in the output or
ajax select data with multiple related data
i want to show checkbox looping from db, if i try to select data id_kendaraan in field then show the data from that id. this my view code: my controller: i get data from view $id_kendaraan for my parameter. this my model: but if i try this code, field tahun_beli, id jenis is success to showing in the view. bu…
User updated information not showing
i have problem in my php which is user updated data is not showing in the page, it shows only the previous data and not the updated data, but the information already updated in database This is my updateForm.php: This is my stdUpdateData.php, where the sql database process the update data: This is the student…
How To Call Procedure MySql in Laravel And Pass it to Blade.php
I got problem when i want to call procedure on MySql, this my code when i load data_saya.blade.php it’s showing an error like this but i has suplied argument foreach on my blade.php what’s wrong with my code? , Sorry for my bad english.. Answer Hi Every one this case is has been solved by doing th…