- Original Message -
From: joe j joe.st...@gmail.com
Good suggestion. But I am a perl/unix illiterate. However I may learn
in them future-you never know!
You're never too old to learn :-)
http://tldp.org/LDP/abs/html/
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't
- Original Message -
From: Rick James rja...@yahoo-inc.com
That sounds like the wrong way to design the schema. Why not have
`country` as a column in a single table?
Given that he got all the data for the new tables from existing ones, I was
assuming he needed separate tables for
- Original Message -
From: joe j joe.st...@gmail.com
/*STEP 2. from the dos prompt?*/
for x in UK ZA IN CN;
do mysql -ujoe -p -e INSERT INTO `table_new`
SELECT var1, var2`, (case when (country='${x}') then 1 else 0 end) AS
citizen
,'${x}' AS ctry
FROM `'${x}'_table`
LEFT
Thanks, Johan.
I run the script in Unix indeed-don't know why I said Dos:)
The problem is caused (at least that is the sense I get, so far) when
I use some conditional statements inside case when as:
(case when (country='${x}' AND var2) then 1 else 0 end)
The problem lies with the part, but
am trying to get is a script that runs through a list of
country names (US, UK, NL, etc) and create tables for each one of
them as above. Is this feasible in MySql?
You can't create multiple tables with one statement; but you *can* put
multiple statements on a single line. However, this does
Jan Steinman wrote
If not, how 'bout the best of both worlds: create a UNIX (or perl) script that
loops
through the country names and creates an SQL script? That would be fast
entering AND fast
performing!
Good suggestion. But I am a perl/unix illiterate. However I may learn
in them future-you
2012/04/03 22:27 +0200, joe j
So what I am trying to get is a script that runs through a list of
country names (US, UK, NL, etc) and create tables for each one of them
as above. Is this feasible in MySql?
There are PROCEDUREs, and there is PREPARE. Look them up.
--
MySQL General Mailing List
- Original Message -
From: joe j joe.st...@gmail.com
So what I am trying to get is a script that runs through a list of
country names (US, UK, NL, etc) and create tables for each one of
them as above. Is this feasible in MySql?
You can't create multiple tables with one statement
to get is a script that runs through a list of
country names (US, UK, NL, etc) and create tables for each one of
them as above. Is this feasible in MySql?
You can't create multiple tables with one statement; but you *can* put
multiple statements on a single line. However, this does nothing
That sounds like the wrong way to design the schema. Why not have
`country` as a column in a single table?
On 4/3/12 6:22 PM, Hal?sz S?ndor wrote:
2012/04/03 22:27 +0200, joe j
So what I am trying to get is a script that runs through a list of
country names (US, UK, NL, etc) and create
Thanks to Rick I would go for a single table. I tried the following,
but hasn't been successful yet. First I created one 'master' table for
one country, with a country column (ctry) as Rick suggested, then I
tried to use the loop suggested by Johan to insert the records for
each of the remaining
Hi,
I have a phpsyslog-ng box with different tables and disk usage is
growing so fast nearly no space left. How must i move the old files
? Is it ok to move just like an ordinary file or do something on
mysql?
Regards
--
MySQL General Mailing List
For list archives:
- Original Message -
From: a bv vbavbal...@gmail.com
I have a phpsyslog-ng box with different tables and disk usage is
I assume that means you have a syslog service that logs to a MySQL database?
growing so fast nearly no space left. How must i move the old
files? Is it ok to
Hi,
I have some xml data following the following DTD. It seems that it is
better to import the xml file into multiple table, for example, author
table, journal table. I read the mysql manual section on load xml,
but I don't see how to load xml in multiple table and how to design
the schema
Hi everyone. I'm trying to create a certain MySQL query but I'm not sure how to
do it. Here is a stripped down version of the result I'm aiming for. I'm pretty
new to queries that act on multiple tables, so apologize if this is a very
stupid question.
I have one table (data) that has two
To: MySql
Subject: Help needed on query on multiple tables
Hi everyone. I'm trying to create a certain MySQL query but I'm not sure
how to do it. Here is a stripped down version of the result I'm aiming
for.
I'm pretty new to queries that act on multiple tables, so apologize
-Original Message-
From: Michael Stroh [mailto:st...@astroh.org]
Sent: June 3, 2010 11:24 AM
To: MySql
Subject: Help needed on query on multiple tables
Hi everyone. I'm trying to create a certain MySQL query but I'm not sure
how to do it. Here is a stripped down version
...@astroh.org]
Sent: June 3, 2010 11:55 AM
To: Steven Staples
Cc: 'MySql'
Subject: Re: Help needed on query on multiple tables
Thanks! That did it perfectly!
Michael
On Jun 3, 2010, at 11:45 AM, Steven Staples wrote:
How about this?
SELECT
`first_table`.`names
with this solution, I would love to read
it.
Again, thank you for your response.
Gary
Michael Dykman mdyk...@gmail.com wrote in message
news:s2p814b9a821004121404ge4415a07tbb2ab1bbba1fd...@mail.gmail.com...
It is not a question of multiple tables, it is a question of multiple
statements. Most PHP
response.
Gary
Michael Dykman mdyk...@gmail.com wrote in message
news:s2p814b9a821004121404ge4415a07tbb2ab1bbba1fd...@mail.gmail.com...
It is not a question of multiple tables, it is a question of multiple
statements. Most PHP configurations prohibit the application of more
than one
Chris.
Thanks for your response. I read somewhere that the mysqli was better, so I
have been using it.
This exercise is an experiment, on my local machine only, so I ommitted any
escape functions. I am trying to create DB's with multiple tables, so it is
totally a learning exercise.
So
://php.net/manual/en/mysqli.multi-query.php
~viraj
On Sun, Apr 11, 2010 at 10:27 PM, Gary gwp...@ptd.net wrote:
I am experimenting with multiple tables, it is only a test that is my
local machine only. This is the current code, which does not work , I
have tried to concatonate the insert
It is not a question of multiple tables, it is a question of multiple
statements. Most PHP configurations prohibit the application of more
than one statement per call to execute. This is generally thought to
be a security issue as the vast majority of simple PHP-based SQL
injection attacks only
...
It is not a question of multiple tables, it is a question of multiple
statements. Most PHP configurations prohibit the application of more
than one statement per call to execute. This is generally thought to
be a security issue as the vast majority of simple PHP-based SQL
injection attacks only
with this solution, I would love to
read it.
Again, thank you for your response.
Gary
Michael Dykman mdyk...@gmail.com wrote in message
news:s2p814b9a821004121404ge4415a07tbb2ab1bbba1fd...@mail.gmail.com...
It is not a question of multiple tables, it is a question of multiple
statements. Most PHP
I am experimenting with multiple tables, it is only a test that is my local
machine only. This is the current code, which does not work , I have tried
to concatonate the insert statements. I have tried multiple $query
variables, but it is just overwriting itself (only the last one gets
inserted
is it mysqli query or 'multi_query'?
http://php.net/manual/en/mysqli.multi-query.php
~viraj
On Sun, Apr 11, 2010 at 10:27 PM, Gary gwp...@ptd.net wrote:
I am experimenting with multiple tables, it is only a test that is my local
machine only. This is the current code, which does not work , I
/mysqli.multi-query.php
~viraj
On Sun, Apr 11, 2010 at 10:27 PM, Gary gwp...@ptd.net wrote:
I am experimenting with multiple tables, it is only a test that is my
local machine only. This is the current code, which does not work , I
have tried to concatonate the insert statements. I have
Ashley M. Kirchner wrote:
Hi folks,
I'm trying to, possibly do the impossible here. I have to select data from
4 different tables to come up with the right information and I'm having one
heck of time trying to figure it out. This is going to be a long email ...
Table_1:
Hi folks,
I'm trying to, possibly do the impossible here. I have to select data from
4 different tables to come up with the right information and I'm having one
heck of time trying to figure it out. This is going to be a long email ...
Table_1:
Table_1.username != 'dopey';
Regards,
Gavin Towey
-Original Message-
From: Ashley M. Kirchner [mailto:kira...@gmail.com]
Sent: Sunday, November 15, 2009 4:38 AM
To: mysql@lists.mysql.com
Subject: Selecting data from multiple tables
Hi folks,
I'm trying to, possibly do the impossible here
c...@hosting4days.com wrote:
:Newbie:
Short Question: Is it possible to create an inner join (or another join)
with multiple tables?
something like
$query_list1 = SELECT table1.id,table1.status, table2.id, table3.id
(more here - etc.) FROM table1
INNER JOIN table2 ON table1.id = table2.id
)
with multiple tables?
something like
$query_list1 = SELECT table1.id,table1.status, table2.id, table3.id (more
here - etc.) FROM table1
INNER JOIN table2 ON table1.id = table2.id
INNER JOIN table3 ON table2.id = table3.id
WHERE table1.status = 'open';
Q: Is something like this possible
:Newbie:
Short Question: Is it possible to create an inner join (or another
join) with multiple tables?
something like
$query_list1 = SELECT table1.id,table1.status, table2.id, table3.id
(more here - etc.) FROM table1
INNER JOIN table2 ON table1.id = table2.id
INNER JOIN table3 ON table2
I am trying to create a php-mysql page to POST new records to several
tables from one php page and I have to retrieve records from several
(like 4 to 8) tables in one query.
Being quite new to php mysql, I am wondering what is the best way to
go about this. My tables consist of
* Structure
Hi,
On Fri, Feb 13, 2009 at 4:52 PM, PJ af.gour...@videotron.ca wrote:
I am trying to create a php-mysql page to POST new records to several
tables from one php page and I have to retrieve records from several
(like 4 to 8) tables in one query.
Being quite new to php mysql, I am wondering
I would like to combine multiple tables into a single table. I can create a
UNION between tables with similar columns cols A, B, and C from table_1
with cols A, B, and C from Table_2. What I can¹t figure out is how to add
additionals columns (D, E, F) from table_2 if the columns don¹t exist
the e-mail from your system.
-Original Message-
From: Tim Carty [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2008 10:41 AM
To: mysql@lists.mysql.com
Subject: Combining Multiple Tables
I would like to combine multiple tables into a single table. I can create a
UNION between
On Friday, 26. September 2008, Tim Carty wrote:
| I would like to combine multiple tables into a single table. I can create a
| UNION between tables with similar columns cols A, B, and C from table_1
| with cols A, B, and C from Table_2. What I can¹t figure out is how to add
| additionals
Hi,
I have 4 tables and need to use 1 query for displaying :
prodbarcode,prod_description,stock_on_hand,qty, (qty-stock_on_hand) Variance,
cost_price, (Variance*cost_price) Var_Amount for a specific store in StCount.
StCount contains several sessionid for 1 store.
C_Sess contains all the
Hello list
I have to make a full text search and I want to do it in many tables.
I have deferent tables for books authors and news.
Any ideas how to do it?
Thank you
Nikos
nikos schrieb:
Hello list
I have to make a full text search and I want to do it in many tables.
I have deferent tables for books authors and news.
Any ideas how to do it?
three separate queries or an UNION
--
Sebastian
--
MySQL General Mailing List
For list archives:
On Jan 9, 2008 8:36 AM, Sebastian Mendel [EMAIL PROTECTED] wrote:
nikos schrieb:
Hello list
I have to make a full text search and I want to do it in many tables.
I have deferent tables for books authors and news.
Any ideas how to do it?
three separate queries or an UNION
Or a Boolean
That is a grate solution.
The problem is that I must have deferent links for each response.
That's the tricky thing!
Thank you
Sebastian Mendel wrote:
nikos schrieb:
Hello list
I have to make a full text search and I want to do it in many tables.
I have deferent tables for books authors and
FROM News T1
WHERE TITLE like '%..whatever..' OR CONTENT like '%..whatever..'
Aloha!
Claudio Nanni
-Messaggio originale-
Da: nikos [mailto:[EMAIL PROTECTED]
Inviato: mercoledì 9 gennaio 2008 14.21
A: mysql@lists.mysql.com
Oggetto: full text search on multiple tables
Hello
I need to find a userid across several different tables.
What is the best way to do this?
For example I have three tables
TableA
TableB
TableC
They all have a field id
I want to find the value 123 in the field id in any one of these tables.
Thanks,
David Ruggles
CCNA MCSE (NT) CNA A+
Network
On Tue, July 31, 2007 8:52, David Ruggles said:
I need to find a userid across several different tables.
What is the best way to do this?
For example I have three tables
TableA
TableB
TableC
They all have a field id
I want to find the value 123 in the field id in any one of these
I want to find the value 123 in the field id in any one of these
tables.
SELECT id FROM TableA WHERE id = 123
UNION
SELECT id FROM TableB WHERE id = 123
UNION
SELECT id FROM TableC WHERE id = 123
Please note that UNION requires that the same number (and type?) of
fields be selected from each
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 31, 2007 11:56 AM
To: mysql@lists.mysql.com
Subject: Re: Finding a value in multiple tables
On Tue, July 31, 2007 8:52, David Ruggles said:
I need to find a userid across several different tables.
What is the best way to do this?
For example I have
Hi,
Is it possible to insert values into two tables simultaneously and
have the value of one of the columns in the second table be the
auto_increment value from inserting into the first?
E.g. if table1 has an auto_increment column c1, the logic I'm looking
for would be something like:
INSERT
Hi,
Hamish Allan wrote:
Hi,
Is it possible to insert values into two tables simultaneously and
have the value of one of the columns in the second table be the
auto_increment value from inserting into the first?
No, because you can only insert into one table at a time. But you can write a
On 6/11/07, Baron Schwartz [EMAIL PROTECTED] wrote:
Hi,
Hamish Allan wrote:
Hi,
Is it possible to insert values into two tables simultaneously and
have the value of one of the columns in the second table be the
auto_increment value from inserting into the first?
No, because you can only
Hi -
I'm having an issue with left joins and multiple tables. I have a table
which is a fairly simple name-value pair table:
create table
{
acnt char(20),
item char(40),
value char (60)
}
I want to pull out all of a subset of the values for a particular account.
It works for
two
I run a SQL statement about UPDATE covering multiple tables, i feel that it is
too slowly.
SQL statement:
update b_bb,tempdb set b_bb.zrk1=tempdb.num
where
b_bb.dwdm=concat(tempdb.shengbm,tempdb.shibm,tempdb.xianbm,tempdb.xiangbm,tempdb.cunbm);
I modify the JOIN syntax like this:
update
2007/2/15, Manuel Vacelet [EMAIL PROTECTED]:
Hi all,
I'm facing a strange behaviour with an UPDATE statement.
I have a table like:
+-+--+
| item_id | rank |
+-+--+
|2812 |2 |
| 13050 |4 |
| 13051 |3 |
| 13052 |1 |
+-+--+
And I want
Hi all,
I'm facing a strange behaviour with an UPDATE statement.
I have a table like:
+-+--+
| item_id | rank |
+-+--+
|2812 |2 |
| 13050 |4 |
| 13051 |3 |
| 13052 |1 |
+-+--+
And I want to switch items 2812 and 13052 rank (i.e.
blind because I don't see anything in
the manual or in the MySQL book on granting to multiple tables at once
and the * wildcard appears to only work by itself, not when appended to
a string (i.e. I can't do grant select on biggie.foo_* to
'foouser'...). I've tried multiple variations of wildcards
Assume database 'biggie' with 15 tables, 10 of which start with
'foo_'. I want the user 'foouser' to have access only to those tables
that begin with 'foo_'.
I'm hoping that I am just being blind because I don't see anything in
the manual or in the MySQL book on granting to multiple tables
of which start with 'foo_'.
I want the user 'foouser' to have access only to those tables that
begin with 'foo_'.
I'm hoping that I am just being blind because I don't see anything in
the manual or in the MySQL book on granting to multiple tables at once
and the * wildcard appears to only work
because I don't see anything
in the manual or in the MySQL book on granting to multiple tables
at once and the * wildcard appears to only work by itself, not
when appended to a string (i.e. I can't do grant select on
biggie.foo_* to 'foouser'...). I've tried multiple variations
Hi,
How do I query multiple tables. For example I have
TableName Accommodation
Field1 AccommodationID
Field2 AccommodationName
I also have
TableName Attractions
Field1AttractionID
Field2 AttractionName
Field3
attractions AS at USING (attractionid);
PB
-
Neil Tompkins wrote:
Hi,
How do I query multiple tables. For example I have
TableName Accommodation
Field1 AccommodationID
Field2 AccommodationName
I also have
TableName Attractions
Field1AttractionID
Field2
Hello all,
I'm sure that this situation is one of the most wondered questions with
JOIN clauses. Anyway, I couldn't find any clear information how to carry
out multiple joins in one query with proper results.
I have four tables:
1. Invoices
2. InvoiceContents
3. Customers
4. Payments
I try to
Ville,
SELECT Invoices.*, SUM(InvoiceContents.Amount * InvoiceContents.Price)
AS InvoiceTotal, Customers.Name, SUM(Payments.Amount) PaidTotal,
MAX(Payments.Date) LastPayment FROM Invoices LEFT JOIN InvoiceContents
ON (InvoiceContents.InvoiceID = Invoices.ID) LEFT JOIN Customers ON
(Customers.ID
Ville Mattila wrote:
I try to get a list of all Invoices with total sum of the invoice and
paid sum of each invoices, as well as a customer name. I try following
query:
SELECT Invoices.*, SUM(InvoiceContents.Amount * InvoiceContents.Price)
AS InvoiceTotal, Customers.Name, SUM(Payments.Amount)
I have four tables that I join to get one record set about a
customer. They are: UserInfo, ExtraAddr, DslInfo, and DslExtra.
Specifically the main tables are joined with:
SELECT * FROM UserInfo u, DslInfo d WHERE u.UserID = d.UserID;
I've been adding more data to other tables and LEFT JOINING
Scott
SELECT *
FROM UserInfo u, DslInfo d
LEFT JOIN DslExtra e ON d.DslID = e.DslID
LEFT JOIN ExtraAddr a ON a.UserID = u.UserID
WHERE u.UserID = d.UserID;
However it appears this syntax is not valid in MySQL 5.x
Right, as the 5.x docs say, 5.x wants ISO-compatible explicit joins, ie
SELECT *
Perfect. This is exactly what I needed. Is there some place I get
some more documentation on the specifics of the ISO-compatible
queries? Might save me some hair-pulling-out in the future.
Scott
Peter Brawley wrote:
Scott
SELECT *
FROM UserInfo u, DslInfo d
LEFT JOIN DslExtra e ON d.DslID =
Scott,
Perfect. This is exactly what I needed. Is there some place I get
some more documentation on the specifics of the ISO-compatible
queries? Might save me some hair-pulling-out in the future.
See 'Changes in 5.0.12' on the Joins manual page
Hello,
I'm alittle unclear on how too update multiple tables. We have two tables with
the same column name:
account.state
account_service.state
when we update the account table, we also need to update the account_service
table with the same value for the 'state' column. Can this be done
- Original Message -
From: Mike Blezien [EMAIL PROTECTED]
To: MySQL List mysql@lists.mysql.com
Sent: Monday, March 27, 2006 3:39 PM
Subject: Update multiple tables
Hello,
I'm alittle unclear on how too update multiple tables. We have two tables
with the same column name
Mike Blezien [EMAIL PROTECTED] wrote on 03/27/2006 03:39:15 PM:
Hello,
I'm alittle unclear on how too update multiple tables. We have two
tables with
the same column name:
account.state
account_service.state
when we update the account table, we also need to update
Miguel
What i need is to list all the products and show the type name of
each of them.
What you need is a join
(http://dev.mysql.com/doc/refman/5.0/en/join.html), eg:
SELECT t.id, t.id_type, t.name, t.desc, t.price, p.name
FROM tbl AS t
INNER JOIN products AS p USING (id)
PB
-
Hi guys,
I am kinda new to mysql and on my endeavour to build a backend for a
site i am building, i need to fetch data from a couple of tables, but
dont know how to do it with a single select.
Heres the problem:
first table (products):
id
id_type
multiple tables in one or few queries. I don't
have an easy way to predict their names (I have a way to find their
names, but it's by using software and I prefer doing it with mysql).
All of the table names have a fixed part which I know, and I thought of
using the fixed, known part of the names
Hello,
I'm using mysql 4.1.14-standard.
I would like to drop multiple tables in one or few queries. I don't
have an easy way to predict their names (I have a way to find their
names, but it's by using software and I prefer doing it with mysql).
All of the table names have a fixed part which I
Hi
I need to update the 'products_id' field (shown below) by copying data from
a separate table but I can't use the 'UPDATE' query as each 'product_id'
entry relates to a specific 'products_model' row.
id / assembly_no / products_id / products_model
1 / 2313 / *** / CASEACERENTRY2
2 / 2313 /
Hello.
Please, could you provide the CREATE statement for you tables
and describe the relationships between their fields (it will
be good if you include sample data as well).
Matthew Batt wrote:
Hi
I need to update the 'products_id' field (shown below) by copying data
from a
Some of these tables are rather large, I would put the schema in there, but
I think it just adds to the mess.
Tables
`users` field id is auto inc pk
`orders` field id is auto inc pk
`products` field id is auto inc pk
`order_items` field order_id is the key for hooking up order_items to
orders,
Scott Haneda [EMAIL PROTECTED] wrote on 11/16/2005 05:44:05 AM:
Some of these tables are rather large, I would put the schema in there,
but
I think it just adds to the mess.
Tables
`users` field id is auto inc pk
`orders` field id is auto inc pk
`products` field id is auto inc pk
todd hewett wrote:
mysql INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER)
mysql VALUES(36534);
ERROR 1216: Cannot add a child row: a foreign key constraint fails
Can you please post the output of:
SHOW CREATE TABLE BOARD_SERIAL_NUMBER;
mysql SHOW CREATE TABLE
Howdy Folks I hope this is not too much information.
I have
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
I have multiple tables.
All are innoD Tables.
All AI on a Primary key integer
All Columns are varchar 255 that are not keys.
Table VCS_PO_NUMBER
Has
Todd Hewett wrote:
I currently am failing with the following:
mysql INSERT INTO VCS_PO_NUMBER (VCS_PO_NUMBER) VALUES(899234),
- INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER) VALUES(36534),
- INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES(INPUT MODULE N12310),
- INSERT INTO
SNIP---
You need to end each INSERT INTO statement with a semicolon (;), not a
comma (,). Also pressing enter after each one will allow you to easier
diagnose any problems that might come up.
-
I have
Todd Hewett wrote:
mysql INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER)
mysql VALUES(36534);
ERROR 1216: Cannot add a child row: a foreign key constraint fails
Can you please post the output of:
SHOW CREATE TABLE BOARD_SERIAL_NUMBER;
mysql INSERT INTO BOARD_TYPE (BOARD_TYPE)
mysql INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER)
mysql VALUES(36534);
ERROR 1216: Cannot add a child row: a foreign key constraint fails
Can you please post the output of:
SHOW CREATE TABLE BOARD_SERIAL_NUMBER;
mysql INSERT INTO BOARD_TYPE (BOARD_TYPE) VALUES(INPUT MODULE
todd hewett wrote:
mysql INSERT INTO BOARD_SERIAL_NUMBER (BOARD_SERIAL_NUMBER)
mysql VALUES(36534);
ERROR 1216: Cannot add a child row: a foreign key constraint fails
Can you please post the output of:
SHOW CREATE TABLE BOARD_SERIAL_NUMBER;
mysql SHOW CREATE TABLE
I have multiple tables set up and need to export these to csv in order to
import them into Excel. Since all tables are related to each other and I can
only export one at a time, is there a way to somehow get a readable file
after importing into Excel, which non-programmers can edit and use
H Ba [EMAIL PROTECTED] wrote on 03/03/2005 02:14:57 PM:
I have multiple tables set up and need to export these to csv in
order to import them into Excel. Since all tables are related to
each other and I can only export one at a time, is there a way to
somehow get a readable file after
multiple tables to CSV
I have multiple tables set up and need to export these to csv
in order to import them into Excel. Since all tables are
related to each other and I can only export one at a time, is
there a way to somehow get a readable file after importing
into Excel, which non
multiple tables which relate to each other and import them into
Excel, so a normal (Excel-)User can work with the data, like copying adresses
or just looking at it, etc.
Have a great day,
Ho.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http
From: Michael Stassen
2) In general, you should'nt put things in the JOIN condition which are
not
part of the JOIN criteria. For example, the condition c.salescode =
'$salescode_param' is a restriction on which rows in c to consider, not a
condition of the JOIN to t or tt, so it belongs in
sam wun wrote:
sam wun wrote:
Hi,
Can anyone tell me how to optimize the following sql statement?
$sql_1 =
SELECT t.prodcode 'Product Code',
t.prodname 'Product Name',
ROUND(avg(t.salesvolume),2) 'PastSales Quantity',
ROUND(avg(tt.salesvolume),2) 'Sales Quantity',
Hi Michael,
Thank you for being so kind to explain the problem to me.
Michael Stassen wrote:
sam wun wrote:
sam wun wrote:
Hi,
Can anyone tell me how to optimize the following sql statement?
$sql_1 =
SELECT t.prodcode 'Product Code',
t.prodname 'Product Name',
Hi,
Can anyone tell me how to optimize the following sql statement?
$sql_1 = SELECT t.prodcode 'Product Code',
t.prodname 'Product Name',
ROUND(avg(t.salesvolume),2) 'PastSales Quantity',
ROUND(avg(tt.salesvolume),2) 'Sales
sam wun wrote:
Hi,
Can anyone tell me how to optimize the following sql statement?
$sql_1 = SELECT t.prodcode 'Product Code',
t.prodname 'Product Name',
ROUND(avg(t.salesvolume),2) 'PastSales Quantity',
It's probably your JOIN on shipped items producing a cross product with
your JOIN on ordered items. What happens if you take the entire
shippeditems JOIN out of your statement? Are your numbers still off?
Since your query is not using data from that table you should be able to
eliminate it
Hi there!
I have some problems with the complex MySQL join operations. In most
cases, LEFT JOIN fulfills my needs but sometimes it doesn't work in the
expected way. I'll give an example:
orders
--
- orderid
- customerid
customers
-
- id
- customername
orderitems
--
- itemid
(or partition, directory, etc.) each file will be stored on,
sort of creating a RAID setup. You would still have one table, but it
would be stored in separate files and InnoDB would fill them up
sequentially. That can give you the same effect of creating multiple
tables, but without the need
Hi All,
I tried digging for this information in the archives but could not
find anything.
I am in to developing an app. that uses very high amount of data
(Close to 80 GB per machine). It has 3-4 logical tables. But I have to
partition them in to multiple tables because the mysql table size
1 - 100 of 289 matches
Mail list logo