1
vote
2answers
30 views

ORDER BY variable AFTER statement

Here is my code: <?php $data = mysql_query("SELECT * FROM board") or die(mysql_error()); while($info = mysql_fetch_assoc( $data )) { if(!empty($info['user'])){ Print "".$info['user'].""; } else ...
1
vote
1answer
23 views

Subquery in select after group-by

I want to display the name of data types, which were used at least 10 times throughout the database, with the number of different tables they were used in, ordered by the latter. While tinkering, I ...
1
vote
2answers
39 views

Operand should contain 1 column(s) in a query

I have this complex query that gives me Operand should contain 1 column(s) error when executing. I know that this error means there are some un-needed brackets but I dont know which ones. This is the ...
0
votes
2answers
25 views

Products on sale quantity

The goal Count products on sale, regardless of the category. A little description There is a table in my database called Categories. Follow the structure: 'Category_Id', 'tinyint(3)' ...
0
votes
1answer
18 views

Django Raw Query SQL injection display attack

I am trying to write a website with Django that could display SQL injection for classroom purposes.However when i try to exploit the query nothing is getting returned. I am using a MYSQL database ...
1
vote
2answers
27 views

MySQL - Find pairs in either column

I have a VERY large table called fullNames: +----+-----------+----------+--------+ | id | name1 | name2 | count | +----+-----------+----------+--------+ | 1 | Homer | Simpson | 2 | ...
0
votes
3answers
32 views

MySQL gives correct output but Java raise exception

I want to show following information - Date Flight | Name Departure Time | Business Class Availability | Executive Class Availability | Economy Class Availability Now all the information are in ...
0
votes
0answers
11 views

MySQL FULL TEXT SEARCH only filter matched word contains results

I'm writing a full text query that kind for a search functionally. It need to get results if that only contain matched word, Ex- product names - 1st product- inkjet epson printer 1158, 2nd ...
0
votes
3answers
19 views

Keep the uniqueness on combination of multiple columns

I have a question for basic sql setting For example table id lastname firstname 1 water bob 2 zet ken 3 tem nick 4 tem ken 5 zet nick I dont need to set unique key ...
-1
votes
0answers
30 views

SQL logic merge multiple table

I got a question on SQL logic that need you guys to help. I have selected a query from Table A and got the required fields. Now, say field A, I want to check if this field exists in table B. If ...
0
votes
0answers
63 views

Select the 5 bests from 5 categories

I have a table userpage with the fields id, userid and pageid. There's a table page with fields id and categoryid as well. With userpage, I link users to pages. This can happen only once for one ...
5
votes
2answers
66 views

Limit SQL by the sum of the row's value

So I'm kind of stumped here, I have a table setup like this +-----------+------+ | Timestamp | Size | +-----------+------+ | 1-1-13 + 10.3 + +-----------+------+ | 1-3-13 + 6.7 + ...
2
votes
2answers
63 views

Is it possible to have table in table (mysql)?

Suppose I defined music as a table and gave it 3 columns: album, artist, and track: CREATE TABLE music ( id int auto_increment primary key, album varchar(45) not null, artist varchar(30) ...
1
vote
2answers
11 views

code igniter SQL_CALC_FOUND_ROWS

How to get total number of rows for particular query and also limiting the query results to 10 rows. For example. I've a table called sample. It has 400 rows. On running a query like where name = ...
0
votes
0answers
7 views

How to run the sql script from the EER designed on MySQL Workbench to MySQL Server (Ubuntu)

I have generated this script from MySQL WorkBench but when i try to run it in my MySQL Server, i get the following error: '17:28:11 DROP SCHEMA IF EXISTS MYA_Database_Schema Error Code: 1044. Access ...

1 2 3 4 5 2012
15 30 50 per page