Data dodania Pytanie
2017-07-28 15:07 Why is this simple join query significantly quicker with a sub-query? »
I have two tables. order_details which is 100,000 rows, and outbound which is 10,000 rows. I need to join them on a column called order_number, which...
(1) odpowiedzi
2017-07-28 03:07 Mysql automated installation stuck »
I have written a script to install some set of packages to a list of servers. When i execute the script mysql installation got stuck at "enter the roo...
(2) odpowiedzi
2017-07-27 10:07 SQL query, check year on one column »
I have a column in my MySQL table showing year. Example: Table: Information ID | Year_sold --- -------- 1 | 2002-2010 2 | 2005-2015 3 | 2011-___...
(1) odpowiedzi
2017-07-27 10:07 Order MySQL result »
I'm using MySQL/MariaDB. I have an query where I use ORDER BY user_id ASC it gives me the following result: +---------+ | user_id | +---------+ | adm...
(2) odpowiedzi
2017-07-27 09:07 Different price requirement depending on the price currency »
I have meta table with the following data: +----+------------+-----------+------------+ | id | product_id | meta_key | meta_value | +----+----------...
(4) odpowiedzi
2017-07-26 17:07 MySQL indexes not used on LIKE for INT? »
I don't know if this is a bug or a feature, or if I'm doing something wrong. I have inherited a MySQL database with a few hundred thousand rows. This ...
(2) odpowiedzi
2017-07-26 17:07 How to query rails way ? Rails 3.2 »
List of relationship between models: class ErrorScope < ActiveRecord::Base belongs_to :server has_many :scope_to_fixflow_map attr_accessibl...
(2) odpowiedzi
2017-07-26 10:07 Strip special characters and space of a DB column to compare in rails »
I have 4 types of last_name: "Camp Bell" "CAMPBELL" "CampBellJr." "camp bell jr." Now, in rails when an user is searched by it's last name like ca...
(2) odpowiedzi
2017-07-26 09:07 Laravel sql take top records and get it's field values average »
how can I be able to get top records e.g top 10 top 5 top 3, I've tried to use AVG on my query but it returns the whole average of a persons record. ...
(1) odpowiedzi
2017-07-26 07:07 get values regarding values in another column »
I want to select all user values where status is review (there are four of them: sky - earth - sea - sun). $stmt = $db->query("select user from po...
(2) odpowiedzi
2017-07-26 06:07 how to count percentage in laravel »
I'm currently working on feedback system where the user can give feedback, In my case, I have to count percentage for each option like the question ha...
(1) odpowiedzi
2017-07-25 22:07 Is it a good practice to use foreach for multiple insertions on a database? »
I have a message and many recipients, what I want to know is when I want to save it.. is it good to use Statement.execute() for each recipient that th...
(1) odpowiedzi
2017-07-25 16:07 Sort MySQL query ASC or DESC depending on value of other table »
I got a query and I want wort sort the result depending on another database. This is my query: SELECT a.`name` FROM `article` AS a LEFT JOIN...
(2) odpowiedzi
2017-07-25 12:07 Convert database time to IST datetime »
I have a time value stored in my database in HH:mm:ss format (using MySQL's time type). This time is to be considered as a value of IST timezone. The ...
(1) odpowiedzi
2017-07-25 11:07 Sending Https Request But Not Getting Response »
I am sending Https request to mysql server but not getting the response while performing the same task on localhost it is working. I have no experienc...
(0) odpowiedzi
2017-07-24 20:07 How to get a related model through a pivot table in Laravel? »
i have a bit of a problem in my Laravel 5.4 application, in my database i have several entities that are related through a central model called Conten...
(1) odpowiedzi
2017-07-24 12:07 2 tables, 3 columns need 1 value »
im new today to mysql so please bare with me. I am trying to get 5 bits of data, 5 of them come from tbl_playerstats these columns are StatsID S...
(3) odpowiedzi
2017-07-24 11:07 PHP+Mysql Display Value from multiple rows in one row »
Hello i have always found here the solution to my troubles but this time i really don't know how to search for what i need, then i will post here hope...
(1) odpowiedzi
2017-07-24 11:07 Using WHERE clause with multiple left join in php »
I successfully did a LEFT JOIN using PHP, however, I am having a little difficulty adding a WHERE clause to enable me select unique record from all ex...
(1) odpowiedzi
2017-07-23 21:07 Fetch entries in table from last using LIMIT a,b or limit offset »
I want to fetch latest entries in a table that is containing more than 1,000,000 entries. I am using this query for an instance SELECT id FROM table...
(4) odpowiedzi
2017-07-23 18:07 How to convert mysql query to query builder for laravel 5? »
I am trying to get all duplicates rows from Customers Table I want to convert the following mysql query into query builder to use in laravel 5. And I ...
(2) odpowiedzi
2017-07-23 18:07 DataTable 1.10.15 table is displaying all results rather than displaying 10 rows in PHP »
I am using CodeIgniter 3 to set up an application. The application has a logs page that is supposed to display the ten most recent records on the scre...
(1) odpowiedzi
2017-07-23 15:07 Average values from different table on join »
CREATE TABLE `reviews` ( `id` int(11) NOT NULL, `average` decimal(11,2) NOT NULL, `house_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=ut...
(2) odpowiedzi
2017-07-23 13:07 SQL select where 1 value is greater then and chose one from the other 4 »
I want to check my database with the following condition: $map = getData($conn, "SELECT * FROM map WHERE amt_cities > 4 AND neighbor_n = false O...
(1) odpowiedzi
2017-07-23 07:07 How to use left outer join in mysql to get my desirable results? »
I have made an sql fiddle. Users with id 100 and 118 should have 0 records for assigned_scopes, assigned_qa, failed_qa and assigned_canvass. But it d...
(2) odpowiedzi
2017-07-22 23:07 Email verification in PHP »
At this moment users can create an account at my website (username, password, email) This wil create an entry in the database which stores the userna...
(3) odpowiedzi
2017-07-22 17:07 SELECT and COUNT with LEFTJOIN in mysql or Query Builder »
I have table Company +--------------------------+ | id | companyname | +--------------------------+ | 1 | JACK | | 2 | ...
(2) odpowiedzi
2017-07-22 06:07 Mysql select all but first and last row »
I want the database to show all the rows, except for the first and last ones, since I have CSS code for them. I tried this: SELECT * FROM db WHERE ...
(5) odpowiedzi
2017-07-22 06:07 Strange duplicate behavior from GROUP_CONCAT of two LEFT JOINs of GROUP_BYs »
Here is all my tables' structure and the query (please focus on the last query, appended below). As you see in the fiddle, here is the current output:...
(1) odpowiedzi
2017-07-21 20:07 MySQL: How to order an SQL query result by numerical difference of multiple rows? »
I have the following table and my goal is to search for customers that most closely resemble another given customer in how they have rated certain man...
(1) odpowiedzi
2017-07-21 16:07 Django: How to disable Database status check at startup? »
As far as I know Django apps can't start if any of the databases set in the settings.py are down at the start of the application. Is there anyway to m...
(1) odpowiedzi
2017-07-21 14:07 Firebase Big query - How to retrieve the data from Custom events table »
I am working on the app which is connecting the Firebase database, My App is basically a marketplace app. I have logging all the user search history t...
(1) odpowiedzi
2017-07-20 22:07 Join works in the rails console, but not the view »
I'm working in Rails 5. I have two tables with a HABTM relationship: publications and authors. They're connected by a join table, authors_publications...
(1) odpowiedzi
2017-07-20 11:07 Remove duplicate values in a cell MySQL »
I have a table with a column 'search_text' type text. In that field I have values: 1. 'MyBook MyBook PDF PDF', 2. 'Example 1 Example 2 Example 3'...
(2) odpowiedzi
2017-07-20 10:07 Order By causing my query to run really slow »
I have an sql query as follows select * from incidents where remote_ip = '192.168.1.1' and is_infringement = 1 order by reported_at desc limit 1; ...
(1) odpowiedzi