how to match the exact timestamp of the database with my date

Hi i have doubt regarding how i can exact match my database timestamp with my date i'm getting date from my URL query string which looks like this 2017-07-19 and my stored date in my database is 2017-07-19 13:40:23 Below query returns 0 results despi

Need to get a query where there is at least one condition

I have a table like this: Table: item isBeautiful: Boolean isGreat: Boolean isAvaliable: Boolean I want to make a query with Eloquent that gives me all the items that are avaliable and are either isBeautiful or isGreat, or both. $avaliableitems = ite

Get String Zero Decimal Floating Point

I have a string string(5) "388.0". I simply want to get exactly float number with one zero or two zero or whatever numbers comes after decimal. How can I achieve it? Simply (float)$val gives me only float(388) without zero.Have you tried the bui

Why is the apache launch banned when the repertoire is at home?

Apache simply unable to access directory (forbidden 403 error), unable to identify the reason why ? I have made a vhost as: created: /etc/apache2/sites-available/ <VirtualHost *:80> DocumentRoot /home/najam/projects/php/testvho

Maximum nesting level of the Use laravel feature

so I started to use Laravel auth and in my Route in web middleware I wrote : Route::group(['middleware' => ['web']], function () { Route::auth(); }); and I got this error : Maximum function nesting level of '100' reached, aborting! and I tried to use

How to know when to look for a new image?

I have a copy of 350+ images on my sever, when a person tries to view one, if it is more than 5 minutes old, I want my sever to check with another website that I am mirroring data from(they insist on me mirroring instead of hotlinking) and get the ne

Create a div for each array row retrieved from MySQL

We have a bunch of data in a MySQL database which call by using this phpcode: $query = "SELECT * FROM `dmt_objects` WHERE PipelineAndWorkflow = 'RWP WF Ready for 4Sprint' ORDER BY `Team` DESC ;"; $select_projects = mysql_query($query); $project_

How to reduce and resize PNG images with transparency in php

I have 512 * 512 big size PNG images with transparency. How to create 256 * 256 PNG images with smaller file size, which also support transparency and maintaining quality. EDIT: I'm using this code but the output image is cropped and not supporting t

Sorting Proximity Search by Post Code by Distance (php / mysql)

I have a table (user_zip_codes) with the users' zip_code, latitude and longitude. I have found a function here on stackoverflow that finds zip codes within a specific radius: function zipcodeRadius($lat, $lon, $radius) { global $mysqli; $zipcodeList

Symfony Doctrine joins a one-to-many relationship

I want to join two tables together to get retrieve all the entities in one search. I have a one to many relationship: Jedi and Member. One member group can have many Jedi's. I want to make a form to search by one entity and displays all of the inform

Returns the numeric value of a string in PHP

How can I get the numeric value from an string? In my case string is R1350.00 and Expected output: 1350 I tried the following: $result = preg_replace("/[^a-zA-Z0-9]+/", "", 'R1350.00'); but I also want to remove the last two string 00.

Can not delete user in codeigniter

I can not delete user in codeigniter, When i click link to delete, it not working. It's a series on tutlus: Build a CMS in CodeIgniter. link delete: /admin/user/delete/3 Controller: class User extends Admin_Controller{ public function __construct() {

call the controller method in href in a button, in a view

iam back with another question to do with mvc and codeigniter. just getting a bit confused with the concept of MVC. First of all i have a button. i want it to reference another page. how i was going to access the next "view" or page was from thi

php thin (explanation of & quot request body & documentation)

I am working with Slim PHP for the first time and I am trying to understand one of the concepts. In the slim PHP documentation, it states: Request Body Use the request object's getBody() method to fetch the raw HTTP request body sent by the HTTP clie

Error creating xml from mySQL database with php

I am following this tutorial from google for google maps: I formatted my code as so: echo '<markers>'; // Iterate through the rows, adding XML nodes for each for($i = 0; $i< $brewery

Analyze XML from YouTube feed (without Zend)

I need to get very specific values from a feed such as this: Some of the nodes I have to read from these bizarrely-formatted XML feed are: <title type="text">Uploading YouTube Videos wi

PHP MSSQL mssql_fetch_array - can not get echo results

I've successfully created a connection to an MSSQL database, executed a query and returned the results using mssql_num_rows. I'm able to get $numRows to echo and show "Rows Returned" on the page. The columns in the table have these names: employ

How to create a custom event in symfony2

I want to create custom events called user_logged so that i can attach my listeners to those events. I want to execute few functions whenever user has logged in.Create a class which extends Symfony\Component\EventDispatcher\Event. Then, use the event

Create a table dynamically from the mysql query

I'm trying to create a page where I input a MYSQL query: SELECT column1,column2 FROM table;, and dynamically create an HTML table with column titles. EDIT: removed most of my question, just left the question part. I have since created a script that d

How to use cURL to find subdomains containing specific strings?

I am trying to build a list of all the city pages on, which does not have such a complete directory. To do this I am using their 'city id' which is unique for each city, but does not follow any particular order. I am using cURL and PHP to lo

Installing PEAR on wampserver

All the guides for installing PEAR on wampserver, such as the Symfony guide, say I am to run a go-pear.bat script within some PEAR directory. I am on wampserver 2.1 and there is no PEAR directory and no go-pear batch script to be found. Is this just

Add null values ​​to a table

I have the this method: public function search($searchKey=null, $summary=null, $title=null, $authors=null, $paginationPage=0) { ... } And I'm trying to retrieve all parameters with this: $Class = new Search(); // Get parameters $ReflectionMethod = ne