- Original Message -
> From: "joe j"
>
> 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 drinkt, is eene kwe
>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
t;
>>>
>>> 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 w
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 "<>" pa
- Original Message -
> From: "joe j"
>
>
> /*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 JOIN
>
- Original Message -
> From: "Rick James"
>
> 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 some specific pu
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 co
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 ta
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; but you *can* put
> multiple statements o
- Original Message -
> From: "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?
You can't create multiple tables wi
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 Gener
- Original Message -
> From: "a bv"
>
> 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 move just like a
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: http://lists.mysql.com/m
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 autom
lto:st...@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:
>
> &
aybe something like this could give you a
> starting point?
>
> Steven Staples
>
>
>> -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
nt: 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 of the result I'm aiming
for.
> I'm pretty new
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
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
7;,'$lname')";
>>
>> $result=mysqli_query($dbc, $query)
>> or die('Error querying database.');
>>
>> mysqli_close($dbc);
>> ?>
>>
>> >
>> $dbc=mysqli_connect('localhost','root','','test')or die('Error connectin
;Error connecting to
MySQL server');
$query="INSERT INTO address (street, town, state,
zip)"."VALUES('$street','$town','$state','$zip')";
$result=mysqli_query($dbc, $query)
or die('Error querying database.');
mysqli_close(
="INSERT INTO address (street, town, state,
> zip)"."VALUES('$street','$town','$state','$zip')";
>
> $result=mysqli_query($dbc, $query)
> or die('Error querying database.');
>
> mysqli_close($dbc);
>
> ?
Michael Dykman" 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 statement per call to execute. This is
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
uery or 'multi_query'?
>>
>> http://php.net/manual/en/mysqli.multi-query.php
>>
>> ~viraj
>>
>> On Sun, Apr 11, 2010 at 10:27 PM, Gary wrote:
>> > I am experimenting with multiple tables, it is only a test that is my
>> > local machine o
tp://php.net/manual/en/mysqli.multi-query.php
>
> ~viraj
>
> On Sun, Apr 11, 2010 at 10:27 PM, Gary 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 tr
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 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 wor
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
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:
+---+-
ame != 'dopey' where
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'
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:
+---+--+--+---
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 = tabl
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.id = table3.id
> WHE
: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 t
Hi,
On Fri, Feb 13, 2009 at 4:52 PM, PJ 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 what is the best way
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
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
and delete
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
UNI
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 in
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 prodb
'%..whatever..&'
UNION
SELECT "I'M A NEWS",ID_NEWS as ID_TO_RETURN
FROM News T1
WHERE TITLE like '%..whatever..&' OR CONTENT like '%..whatever..&'
Aloha!
Claudio Nanni
-Messaggio originale-
Da: nikos [mailto:[EMAIL PRO
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
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
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: http://lists.mysql
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
satto [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?
>
> 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
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
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+
Netw
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
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 sto
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 IN
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 fo
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 wan
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. assi
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 by itself, not when appended to
a st
'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 by itself, not
when appended to a string (i.e. I can't do "grant sel
ith 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 multi
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 o
R JOIN 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
Field1Attrac
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
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) Pa
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
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 ge
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
(http://dev.mysql.com/doc/refman/5.1/en/joi
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.Ds
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
SEL
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 to
"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 upda
- Original Message -
From: "Mike Blezien" <[EMAIL PROTECTED]>
To: "MySQL List"
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 s
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 th
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
-
Mi
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
.
> 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 know, and I th
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 fix
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
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 /
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
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, al
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
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 BOARD_SERIAL_NUMB
>> 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
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) VALUE
SNIP---
You need to end each INSERT INTO statement with a semicolon (;), not a
comma (,). Also pressing after each one will allow you to easier
diagnose any problems that might come up.
-
I have run th
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 RE
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
ul idea on
how to export 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.mysq
m
> Subject: DB Export 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&q
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
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 ed
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 belon
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',
ROUND(avg(t.salesvolu
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',
R
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)
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 Quan
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 f
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
-
disk (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 nee
Thanks a lot for the quick response :)
We are not using MyISAM tables. All our tables are
InnoDB tables. The rational behind this decision is
that the database is expected to get hundreds of
insert queries per second, so we want the row level
locking
of InnoDB to speed this up. (I should ha
1 - 100 of 306 matches
Mail list logo