Data dodania Pytanie
2017-01-02 03:01 MySQL ORDER BY different table column but »
I've been struggling a lot with this and it's really complicated so please focus because it's even hard to explain. I have a table friends with colu...
(2) odpowiedzi
2017-01-01 20:01 order of mysql query changes after the query »
when I make the Query SELECT * FROM roadtrips ORDER BY start_date DESC, username DESC; I get the results ordered in the way I want. But w...
(1) odpowiedzi
2017-01-01 15:01 10 Million rows taking 3.50 seconds for a simple type query »
I'm new to database query optimization. Here is the create table query: CREATE TABLE mo ( id int UNSIGNED NOT NULL auto_increment, msisdn varcha...
(1) odpowiedzi
2017-01-01 14:01 Use MySQL IN condition in FIND_IN_SET »
I have a query where I use a pretty intensive WHERE IN clause to get a list of ID's related to players. SELECT p.name, 0a.stat_value FROM leaderhe...
(1) odpowiedzi
2017-01-01 08:01 Python: Writing data from python to mysql on rasb pi »
I am new to python as well as to coding on Raspberry Pi. I am reading data from a sensor and trying to store it in MySQL. I managed to set up MySQL an...
(1) odpowiedzi
2017-01-01 00:01 How to achieve this complex search using jQuery datatable plugin? »
I am trying to make a searchable interface and my backend includes three MySQL database tables: tbl_country mysql> select * from tbl_country; +--...
(1) odpowiedzi
2016-12-31 16:12 Ruby on rails , test is saying a column doesn't exist but its on the schema »
in my clients table, I have a column named email. But when I made the tests for the clients controller and the model, the tests kept on saying that th...
(1) odpowiedzi
2016-12-31 15:12 Mysql-query "order" does not work on providers server »
I have the simple SQL-query: SELECT * FROM roadtrips ORDER BY start_datum DESC, von_benutzername DESC; (where start_datum is start_date) ...
(0) odpowiedzi
2016-12-31 12:12 Applying group by in a LINQ Query, the information required in further join is lost »
I have the following models: public class Course { public int Id { get; set; } public string Name { get; set; } } public class Course_Tution...
(2) odpowiedzi
2016-12-31 09:12 SQL Query to select Between two days of the month »
I want to have a SQL Query that selects between two dates of months. Lets say between the 15th and the 15th of the next month. This is for accountin...
(4) odpowiedzi
2016-12-31 00:12 Friends of a user + mutual friend test with another user »
I have this table that I use (but not only) for storing friends in a database : user_1 | user_2 | status where 'status' can be -1,0 or 1. Here, we ...
(2) odpowiedzi
2016-12-30 07:12 Searching between two dates in mysql »
I have two tables and this table name is "rooms" and other one is "bookings" I joined two tables now, I want values when i will search between book...
(2) odpowiedzi
2016-12-30 07:12 I want to delete all subcategory from database automatically when I delete the parent category »
When a parent category(e.g., Architecture, Art and Culture) is dropped from the database, I want all subcategories under the parent category to be dr...
(5) odpowiedzi
2016-12-30 06:12 How to convert Foreign Key Field into Many To Many Field without disturbing existing data in the database? »
My code snippet is as follows : class Table1(models.Model): name = models.CharField(max_length=20) class Table2(models.Model): name = models...
(2) odpowiedzi
2016-12-29 14:12 C# protect database connection informations »
Currently I'm storing my C# mysql connection informations inside the class file itself, which doesn't seem that smart, since end users could simply us...
(2) odpowiedzi
2016-12-29 06:12 wordpress query all post that start with number »
I am trying to show all posts that contain a number. I am using this code : global $wpdb; $postids = $wpdb->get_col($wpdb->prepare(" SELECT ...
(1) odpowiedzi
2016-12-29 03:12 How to search all articles belongs to a tag in laravel »
Article Model class Article { public function Tag(){ return $this->belongsToMany('App\Tag'); } } Tag Model class Tag { public...
(3) odpowiedzi
2016-12-28 18:12 How to convert MySQL TIMESTAMP to date time in PHP »
I have a MySQL DB table with a column named "timestamp", a type of timestamp, and attribute of on update CURRENT_TIMESTAMP and a default of CURRENT_TI...
(4) odpowiedzi
2016-12-28 13:12 Strange case insensitive select behavior Django + mysql »
I Have simple model in Django: class Tag(Model): name = CharField(unique=True, max_length=50) When I do: t = 'Ansible' print("Want tag: " + t)...
(1) odpowiedzi
2016-12-28 10:12 Select only one row while doing groupby in mysql »
T have the following table: mid pid price 1 100 10 1 200 10 1 300 10 1 400 10 2 500 20 2 600 30 2 700 20 3 800 40 3...
(5) odpowiedzi
2016-12-28 05:12 Many to many relationships store and update in laravel »
I create three tables: Post Table id--title--body Tags Table id--name post_tag post_id--tag_id Post Model public function tags() { return ...
(1) odpowiedzi
2016-12-27 20:12 Find values in one column that share same value in different column without knowing the 2nd cols value »
Given This Table: Relationship managerId companyId 12 33 19 33 27 44 21 33 4 20 Is there...
(3) odpowiedzi
2016-12-27 13:12 MySQL inner join same table based on field value »
I have a table structure as follows: |id|record_id|key |vale |1 |2 |email |xx@xxx.com |2 |2 |name |John |3 |2 |tel...
(1) odpowiedzi
2016-12-27 11:12 How to fetch two different type of user in SQL »
I have a table in which i have four columns id user_type user_role org_id Now if the user_type is 1 (i.e individual) then the user_role and org_id...
(3) odpowiedzi
2016-12-27 03:12 What actually happens during table JOINs? »
I'm trying to see if my understanding of JOINs is correct. For the following query: SELECT * FROM tableA join tableB on tableA.someId = tableB.s...
(1) odpowiedzi
2016-12-26 21:12 Node.js - Passing multiple objects to same EJS file »
I have multiple MySQL query results where I render the first and make callable the rest ones to a single EJS file (/data) as objects. I render only t...
(1) odpowiedzi
2016-12-26 12:12 How to select count and use where with Laravel's fluent query builder? »
in my case $products = $products->select(array('products.*', \DB::raw('COUNT(extra_fields.price) as price_count')))->leftJoin('extra_fields', ...
(2) odpowiedzi
2016-12-26 08:12 How to iterate throught the values of an array using VueJS? »
I am developing with Laravel 5.3 . I am using fractal as well. I also axios as Http Client to perform Ajax Requests. If i send a get request to displ...
(2) odpowiedzi
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