422 solutions found in database
Page 1 of 22votes
I have a problem with my MySQL error log which currently mostly consists of "mbind: Operation not permitted" lines (see below). Why does it happen and...
votes
I'm using PHP to build the URL of the current page. Sometimes, URLs in the form of www.example.com/myurl.html?unwantedthngs are requested. I want...
votes
I'm trying to create a report page that shows reports from a specific date to a specific date. Here's my current code: $now = date('Y-m-d'...
votes
I have some troubles with an array. I have one array that I want to modify like below. I want to remove element (elements) of it by index and then re-index arra...
votes
How can I turn a **string** below into an **array**? pg_id=2&parent_id=2&document&video This is the array I am looking for, array(...
votes
I am sending an error response to my jQuery. However, I can not get the response text (in the example below this would be **Gone to the beach**) The only th...
votes
I'm trying to run the following PHP script to do a simple database query: $db_host = "localhost"; $db_name = "showfinder";...
votes
What is the best method for converting a PHP array into a string? I have the variable `$type` which is an array of types. $type = $_POST[type]; I...
votes
I want to sort multiple columns in Laravel 4 by using the method `orderBy()` in Laravel Eloquent. The query will be generated using Eloquent like this: S...
votes
How can I merge two arrays (one with string => value pairs and another with int => value pairs) while keeping the string/int keys? None of them will ever...
votes
Assume you have a GraphQL type and it includes many fields. How to query all the fields without writing down a long query that includes the names of all the fi...
votes
What is the "less code needed" way to get parameters from a URL query string which is formatted like the following? > www.mysite.com/category/su...
votes
The callback function in [`array_filter()`][1] only passes in the array's values, not the keys. If I have: $my_array = array("foo" =...
votes
When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission logi...
votes
How do I say `WHERE (a = 1 OR b =1 ) AND (c = 1 OR d = 1)` For more complicated queries am I supposed to use raw SQL?
votes
Let's say I have code like this: $dbh = new PDO("blahblah"); $stmt = $dbh->prepare('SELECT * FROM users where username =...
votes
Is it possible to find the `foreach` index? in a `for` loop as follows: for ($i = 0; $i < 10; ++$i) { echo $i . ' '; } `$i`...
votes
I'm curious to know if it's possible to bind an array of values to a placeholder using PDO. The use case here is attempting to pass an array of values...
votes
Is there a standard way of passing an array through a query string? To be clear, I have a query string with multiple values, one of which would be an array...
votes
I'm using the Laravel Eloquent query builder and I have a query where I want a `WHERE` clause on multiple conditions. It works, but it's not elegant....