Data dodania Pytanie
2016-12-26 08:12 ACF filter custom posts by subfield of repeater field »
I'm following the official guide in ACF documentation but hasn't been able to get it right. I'm using Advanced custom fields and Custom post type UI p...
(1) odpowiedzi
2016-12-26 05:12 How to select a primary key which has exact foreign keys matches a given list of values? »
For example: pk_ref fk ====== === 1 a 1 b 1 c 2 a 2 b 2 d How do I do a query like the "pseud...
(5) odpowiedzi
2016-12-26 02:12 SELECT * fields order »
Does MySQL guarantee that a query like SELECT * from mytable will output its fields exactly in the same order as DESCRIBE mytable does? We ha...
(1) odpowiedzi
2016-12-25 23:12 How to change SQL query in PHP in relation to what drop down menus the user selects »
I am currently doing a project in school which involves using a form to query a database. This form has multiple drop down menus and I am unsure on ho...
(1) odpowiedzi
2016-12-25 14:12 Make 'Related To' section based on same Category in laravel »
I have a website where i post recipes. each one of them has a category, and i want to display 2-3 more posts with the same category of that post. how ...
(2) odpowiedzi
2016-12-25 07:12 Laravel orm database query inside model function »
I am new in Laravel. I want to make some custom functions in models which is related to database query. Class A Extends Controller{ public function...
(1) odpowiedzi
2016-12-25 03:12 MySQL match values in IN clause to every group value »
I have the following MySQL table: id value 1 a 1 b 2 b 2 c 3 c I want to query this table and get all the ids whose group matched ...
(1) odpowiedzi
2016-12-24 19:12 Why does this procedure run in MYSQL but not in Java? »
I'm new to Java and struggling a bit. I've set up a procedure in mysql to return employee details when the last name is entered: CREATE PROCEDURE ...
(2) odpowiedzi
2016-12-24 11:12 How to select table row values as columns of sum of values »
I have the below table: CREATE TABLE products ( date DATE, productname VARCHAR(80), quantity INT(5) ); INSERT INTO `products`(`date`, `productname`,...
(2) odpowiedzi
2016-12-24 10:12 Laravel 5: How to dump SQL query? »
Laravel 5's built-in solution In Laravel 5+, we can use \DB::getQueryLog() to retrieve all executed queries. Since, query logging is an extensive ope...
(2) odpowiedzi
2016-12-23 22:12 Input golf scores and store in MySQL using PHP »
I'm trying to create a website with a Leaderboard for a golf tournament and the idea is to have people be able to post scores for each hole, which wil...
(1) odpowiedzi
2016-12-23 12:12 PHP IP address truncated in loop »
I have a MySQL table that contains IP addresses: Table IP addresses When I loop the addresses in PHP, they'll be truncate: string(3) "192" string(...
(1) odpowiedzi
2016-12-23 09:12 SELECT using BETWEEN in MYSQL and PHP Variable »
I have this code below. <?php require_once 'con.php'; $start_time_input = strtotime('08:00:00'); $finish_time_input = strtotime('17:00:00'); $t...
(1) odpowiedzi
2016-12-23 01:12 MySQL Insert Select Doesn't Enforce NOT NULL Constraint »
I'm having an issue with MySQL 5.6 InnoDb ignoring a NOT NULL foreign key when running an INSERT INTO xxx (col) SELECT .... The constraint is enforced...
(1) odpowiedzi
2016-12-22 14:12 Select all records from MySql database based on month »
I would like to get all records from a MySQL date field with the Hibernate Criteria API. Basically I would like the query to select all rows from the ...
(1) odpowiedzi
2016-12-22 10:12 Why I get `ActiveRecord::NoDatabaseError: Unknown database` error when trying to use numbers and underline in database name? »
I am using ruby-2.2.4, Rails 4.2.5 and MySQL 5.7.16 with gem mysql2 in my Ruby on Rails application. I have created database with name 123_4 and set d...
(1) odpowiedzi
2016-12-22 09:12 Docker Compose with PHP, MySQL, nginx connection issue »
I have problem to connect to MySQL container. docker-compose.yml version: '2' services: mysql: image: mysql:latest environment:...
(1) odpowiedzi
2016-12-22 09:12 Define FK names in many-to-many relationship »
I what have many-to-many relationship between two entities. Everything works fine. Is there a way to define names of FKs in intermediate table(StoresP...
(1) odpowiedzi
2016-12-21 19:12 groupBy within withCount closure (Laravel 5.3.26) »
Within Laravel 5.3.26, is it possible to group the result of withCount based on a column of that relationship? Something as follows, for example: $br...
(0) odpowiedzi
2016-12-21 16:12 Error DeserializeJSON() MySQL json_object »
I am getting back a JSON string from a MySQL 5.7 query in ColdFusion 9.0.1. Here is my query: SELECT ( SELECT GROUP_CONCAT( ...
(1) odpowiedzi
2016-12-21 14:12 How to count the occurrences in multiple column in SQL »
I have the following table in SQL TV_Show | genre_1 | genre_2 | a | action | sci-fi | b | sci-fi | comedy | c | comedy | roman...
(2) odpowiedzi
2016-12-21 05:12 Connecting two tables in mysql »
I have two tables in my database - vnames and vtypes vtypes have a name field and a id field, vnames have a id field, name field and a vtypes_id field...
(2) odpowiedzi
2016-12-20 19:12 Replace/display new line from MYSQL to PHP »
I have a big problem displaying line breaks from mysql in my php generated html page. I tried out nl2br(), manual str_replace() and so on... In my sql...
(2) odpowiedzi
2016-12-20 12:12 Rails: how do I test a helper method that executes a mysql query »
I'm having a method in a helper, that determines whether a user has a specific flag (enabled), based on tags and a code, stored in a cookie. def user...
(1) odpowiedzi
2016-12-20 06:12 Laravel 5: How to do a join query on a pivot table using Eloquent? »
I have 2 tables in my Laravel application namely customers and stores. Customers can belong to many stores and stores can have many customers. There's...
(3) odpowiedzi
2016-12-20 00:12 Laravel and results of stored MySQL Procedures »
I'm dealing with some really old code I'm trying to get running on Laravel. The database is complicated and full of unnecessarily long stored procedur...
(1) odpowiedzi
2016-12-19 23:12 How can I delimit the possible values of a foreign key? »
I have three tables in a MySQL DB. This is the main table with organisation related stuff. Every Organisation has an unique identifier which is also t...
(1) odpowiedzi
2016-12-19 21:12 Substraction Between MAX and Count »
I want to get the difference between the max quantity of books written by an author and the quantity writed by each author. SELECT count(book_name) ...
(2) odpowiedzi
2016-12-19 06:12 php - convert mysql data into json object »
I using codeigniter. I want to retrive data from database and convert it into JSON object not JSON array.I'm using following code public function...
(4) odpowiedzi
2016-12-18 12:12 Multiple Selection Query MySQL »
Is it possible to make a query which selects one record that has the player_type 'IF' and 10 records that has the player_type 'Gold' which is ordered ...
(2) odpowiedzi
2016-12-18 08:12 Rails 3: What is the best way to update a column in a very large table »
I want to update all of a column in a table with over 2.2 million rows where the attribute is set to null. There is a Users table and a Posts table. E...
(2) odpowiedzi
2016-12-18 07:12 PHP - MYSQL ZingChart Time is 7 hours ahead »
ZingChart: MySQL Table: How do i fix this? The time in the graph doesn't match the time in the database. Any help is appreciated. Here's the s...
(1) odpowiedzi
2016-12-18 05:12 Update table if exist else insert »
I have a table named a userindex bts userid accountnumber isalepo 119459 190900 a@qubee.com.bd 000000000000004 0 31513 1a1430 b@qu...
(2) odpowiedzi
2016-12-17 23:12 Laravel 5 bulk insert with relations »
I need to bulk insert lots of data to mysql. Around 500k rows, with relations (hard part) in Laravel 5.3 Tables are vehicles, users and user_vehicle ...
(2) odpowiedzi
2016-12-17 22:12 mysql when sub-query return null »
I try to do the the following query with mysql (Should add more conditions, but simplified it for the question, so the sub-query sometimes return null...
(4) odpowiedzi