What would be the most efficient order to join in? Say I have one main
table with most columns (I assume this should be the main table of the
query) then each table relates to the next, is it as simple as putting them
in order?
"Peter Brawley" <[EMAIL PROTECTED]> wrote in message
news:[EMAI
[EMAIL PROTECTED] wrote:
Wouldn't it be just as simple to count all 'neg', 'pos', and 'ind' values
for both columns? By the way, is there some other column you are grouping
by or is it always going to apply to entire tables of information?
I know this is not what you wanted. However, what you
sheeri kritzer wrote:
You could do something similar to the following:
set @a:=0; select 0 from Dummy where
if(status="Pos",@a:=null,@a:[EMAIL PROTECTED]); select @a;
Use the value of @a -- it will be null if there was ever a null value
(because 1+NULL=NULL) and it will be the count if there
Ahh, I thought I needed to subscribe just to have access to post like the
php mailing lists. Didn't realized that was just for emailed copies.
Thanks.
""Logan, David (SST - Adelaide)"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Click the help menu? They show up in your inbox
Click the help menu? They show up in your inbox because you subscribed
to the list. Perhaps the forums (http://forums.mysql.com) may be a
better place for you to check out.
Regards
David Logan
Database Administrator
HP Managed Services
148 Frome Street,
Adelaide 5000
Australia
+61 8 8408 4273 -
I am using outlook express to view this mailing list, I do not need the
posts actually mailed to my account, how can I address this?
Thanks in advance,
Matt
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTE
I'm getting locking issues due to tables very often updated/insert.
It's splitted into two tables, one has the more updated data and the another
has the more static data. I'm using queries with JOIN, would it be better
for performance to use two queries instead of using JOIN?
Thanks.
Ivan L.
Matt,
>When using JOINS by the simply supplying a comma separated list of
tables in
>the FROM clause, is the ON argument normally associated with a join
intended
>to be addressed in the WHERE clause, or should ON still be used?
There's no ON clause for a join specified by a WHERE clause, and
[EMAIL PROTECTED] wrote:
Wouldn't it be just as simple to count all 'neg', 'pos', and 'ind' values
for both columns? By the way, is there some other column you are grouping
by or is it always going to apply to entire tables of information?
I know this is not what you wanted. However, what you
When using JOINS by the simply supplying a comma separated list of tables in
the FROM clause, is the ON argument normally associated with a join intended
to be addressed in the WHERE clause, or should ON still be used?
// Comma separated join
SELECT u.*, a.city FROM users u, addresses a WHERE u.id
On Monday 28 November 2005 04:45 pm, Dan Nelson wrote:
> In the last episode (Nov 28), Hal Vaughan said:
> > I have a table that lists the tasks a program has to do. Lately I've
> > found I can have an "at-a-glance" status report of how things are
> > going on by writing a loop (in bash scripting,
Hi ,
IMHO the corect way is to check if IS NULL
SELECT
fieldOne,
fieldTwo,
IF(fieldThree IS NULL,fieldFour,fieldThree) as Company
FROM table;
Depening on the column definition(if is byte,multi-byte...etc.), LENGTH()
function can have various behaviour and is not quite sure that you will get
In the last episode (Nov 28), Hal Vaughan said:
> I have a table that lists the tasks a program has to do. Lately I've
> found I can have an "at-a-glance" status report of how things are
> going on by writing a loop (in bash scripting, on Linux, btw) that
> uses "mysql -e" to display the list of t
I have a table that lists the tasks a program has to do. Lately I've found I
can have an "at-a-glance" status report of how things are going on by writing
a loop (in bash scripting, on Linux, btw) that uses "mysql -e" to display the
list of tasks and their current state. It's quick and a lot s
"Cory @ SkyVantage" <[EMAIL PROTECTED]> wrote on 11/28/2005 02:38:50
PM:
> I have a similar question. How do you test if the field in question
> isn't NULL or '' (empty string)? Is the LENGTH a good test or is
> there a better way?
>
> [EMAIL PROTECTED] wrote:
>
> >LENGTH does exist (as
> I have a similar question. How do you test if the field in question
> isn't NULL or '' (empty string)? Is the LENGTH a good test or is
> there a better way?
WHERE myfield IS NOT NULL
--
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscen
I have a similar question. How do you test if the field in question
isn't NULL or '' (empty string)? Is the LENGTH a good test or is
there a better way?
[EMAIL PROTECTED] wrote:
LENGTH does exist (as a function):
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
and here is h
Scott
>select
>fieldOne,
>fieldTwo,
>if(fieldThree.length>0) then fieldThree as Company
>else fieldFour as Company
>from table;
SELECT
fieldOne,
fieldTwo,
IF( LENGTH( fieldthree ) > 0, fieldthree, fieldFour ) AS Company
FROM table;
PB
-
Scott Klarenbach wrote:
I'd like to do the f
Scott Klarenbach <[EMAIL PROTECTED]> wrote on 11/28/2005 01:58:22
PM:
> I'd like to do the following in my view
>
> select
> fieldOne,
> fieldTwo,
> if(fieldThree.length>0) then fieldThree as Company
> else fieldFour as Company
>
> from table;
>
> I realize this syntax isn't correct an
> > > Part of me agrees with you, on a "Pure SQL level". but then why would
> > > anyone ever use ENUM or SET?
> >
> > I wouldn't :-)
> >
> > IMO, they're abominations that are to be avoided.
>
> Again, part of me agrees with you. But part of me, particularly the
> part that says "our queries need
I'd like to do the following in my view
select
fieldOne,
fieldTwo,
if(fieldThree.length>0) then fieldThree as Company
else fieldFour as Company
from table;
I realize this syntax isn't correct and length doesn't exists, but is
this possible? I've seen it done in SQLServer, but can't reme
Hello.
Sorry for a such delayed reply. Very often similar
errors are caused by low value of open_files_limit
system variable. Increase it as much as possible
and if the problem disappears, decrease it gradually.
If this doesn't help, check if the problem remains on
the latest release.
Hi Sheeri!
I'm afraid you misunderstood what my problem was. See the thread "Database
IDs" where I posted a better test case (on the 16th of November), and also
the bug report at this address:
http://bugs.mysql.com/bug.php?id=6880
Björn Persson
--
MySQL General Mailing List
For list archives:
On 11/28/05, Martijn Tonies <[EMAIL PROTECTED]> wrote:
>
> > Part of me agrees with you, on a "Pure SQL level". but then why would
> > anyone ever use ENUM or SET?
>
> I wouldn't :-)
>
> IMO, they're abominations that are to be avoided.
Again, part of me agrees with you. But part of me, particula
> Part of me agrees with you, on a "Pure SQL level". but then why would
> anyone ever use ENUM or SET?
I wouldn't :-)
IMO, they're abominations that are to be avoided.
Now, ENUM could be a bit useful. The Pure SQL way to avoid those
would simply be a column of the right datatype and a CHECK c
Part of me agrees with you, on a "Pure SQL level". but then why would
anyone ever use ENUM or SET?
-Sheeri
On 11/28/05, Martijn Tonies <[EMAIL PROTECTED]> wrote:
>
>
>
> > I did answer my own question, and that's why I said:
> >
> > > That being said, the point of this post is to ask -- Is MySQL
Hi Björn,
I tested what you did on one of my systems, running 4.0.20:
mysql> create table parent (
-> ID int unsigned not null auto_increment,
-> value varchar(50),
-> primary key (ID)
-> ) engine=InnoDB;
create table child (
ID int unsigned not null auto_increment,
parent_I
As far as I can tell, there's no way to do what you specify. If you
want less pre-processing, you can use the "IGNORE n LINES" command of
LOAD DATA INFILE:
http://dev.mysql.com/doc/refman/5.0/en/load-data.html
The pre-processing involved with that is:
1) Decide how many parts you want to split y
On 11/28/05, sheeri kritzer <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> On my system, I have the following in my show charset (I eliminated
> the ones that didn't deal with chinese, so this is a partial listing)
>
> mysql> show charset;
> +--+-+---
You could do something similar to the following:
set @a:=0; select 0 from Dummy where
if(status="Pos",@a:=null,@a:[EMAIL PROTECTED]); select @a;
Use the value of @a -- it will be null if there was ever a null value
(because 1+NULL=NULL) and it will be the count if there were no 'Pos'
values.
So
Dude! I am so sorry. I was the one (way) off topic. No more list work for
me until my coffee kicks in. Completely "my bad". :-(
Shawn
Gary Richardson <[EMAIL PROTECTED]> wrote on 11/28/2005 10:44:53
AM:
> Whaaa? I did no such thing. My post was on topic.
>
> On 11/28/05, [EMAIL PROTECTED] <[
Gobi <[EMAIL PROTECTED]> wrote on 11/28/2005 10:34:37 AM:
> Felix Geerinckx wrote:
>
> >On 28/11/2005, Gobi wrote:
> >
> >
> >
> >>I need to write a select clause based on the following conditions:
> >>
> >>If all rows of status1 == "Neg"
> >>count all "Neg" rows in status1
> >>else
> >>check if
Whaaa? I did no such thing. My post was on topic.
On 11/28/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Marcus Bointon <[EMAIL PROTECTED]> wrote on 11/28/2005 04:45:54
> AM:
>
> >
> > On 28 Nov 2005, at 00:41, [EMAIL PROTECTED] wrote:
> >
> > > The only times MySQL server interact directly w
This solution is valid, but not advisable. If you run your server in a
production environment, you shouldn't allow the dl function, as your users
could activate any extension
> Or better, add that extension runtime because otherwise it will just
consume
> computer resources, and maybe not every PH
Felix Geerinckx wrote:
On 28/11/2005, Gobi wrote:
I need to write a select clause based on the following conditions:
If all rows of status1 == "Neg"
count all "Neg" rows in status1
else
check if all rows of status2 == "Neg"
count all "Neg" rows in status2 and status1
endif
endif
No
Hi Mike,
It sounds like what you need to know is what a B-tree index is and how
it works. I took a course in Data Structures and Algorithms that
taught it to me. Try
http://www.bluerwhite.org/btree/
and the links at the bottom.
Specifically,
"B-Tree-Delete
Deletion of a key from a b-tree is
From: "Ciprian Constantinescu" <[EMAIL PROTECTED]>
> In PHP 4.1 you have to include the mysql.so extension. To do so, you have
to
> modify php.ini, extensions section
>
Or better, add that extension runtime because otherwise it will just consume
computer resources, and maybe not every PHP program
> I did answer my own question, and that's why I said:
>
> > That being said, the point of this post is to ask -- Is MySQL working
> > on allowing the SET limit to increase? Or is that just too much
> > storage and math?
>
> Using a SET is, I believe, MUCH faster than making a special table
> s
I did answer my own question, and that's why I said:
> That being said, the point of this post is to ask -- Is MySQL working
> on allowing the SET limit to increase? Or is that just too much
> storage and math?
Using a SET is, I believe, MUCH faster than making a special table
simply to normaliz
In PHP 4.1 you have to include the mysql.so extension. To do so, you have to
modify php.ini, extensions section
"sheeri kritzer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Sounds like the binary you used did not have PHP compiled with the
MySQL libraries.
If you make a phpinfo()
You, yourself, explain why your suggestion would be a bad fit for this
project: SET is limited to just 64 discrete values per table.
I cannot remember reading that increasing the size of the SET features as
a priority on any development list. I might have missed something but I
don't think tha
Hello.
> CONNECT_PRIOR is the right value?
Sorry, but "right value" for what? It is not a number of threads,
it is priority.
> It was only for example. MySQL 4.* has only one(!) thread/process.
> Why? MySQL 5 has more again.
Did you make your experiments on the same machine or differe
Hello.
I'm not PHPMyAdmin guru, but at least LOAD DATA LOCAL feature (if it is
present in PHPMyAdmin) can be disabled due to some security reasons. See:
http://dev.mysql.com/doc/refman/5.0/en/load-data-local.html
Joe Herman wrote:
> To those thinking of answering this question, The
Hi Friends,
I have a MyISAM table with about 10 million rows.
When I drop the (multi-column) Primary Key (PK) it takes more than 10 minutes.
I thought that any key or index was a kind of table in itself.
And if so, dropping the PK could be as fast as a Truncate statement (a second).
Am I missing so
I have an idea about how to solve it. . .
contact the PHP list, or whatever the programming language you are using shows.
You might also try printing out the query that the program is using,
and run that command from the mysql client directly, to see if the
result is an error or if it really retu
Sounds like the binary you used did not have PHP compiled with the
MySQL libraries.
If you make a phpinfo() page, does the "Configure Command" section
show a --with-mysql parameter?
-Sheeri
On 11/24/05, Sanjay Arora <[EMAIL PROTECTED]> wrote:
> Please help. Newbie running Centos 4.2 with mySQL &
On this note, I feel as though the best way to do this in MySQL is to
use the ENUM or SET types, instead of indexing against a separate
table -- I'm guessing SET, so each piece of clipart can be associated
with more than one category. Of course, that eliminates relevancy
searches (which you could
On 28/11/2005, Gobi wrote:
> I need to write a select clause based on the following conditions:
>
> If all rows of status1 == "Neg"
> count all "Neg" rows in status1
> else
> check if all rows of status2 == "Neg"
> count all "Neg" rows in status2 and status1
> endif
> endif
Not sure if I under
"prathima rao" <[EMAIL PROTECTED]> wrote on 11/28/2005 08:14:44 AM:
> i was tring mysqldump command line for exporting data to xml format it
is
> giving an error can anyone help me with the command line syntax
>
> rao
>
>
Your post was eqivalent to : "I keep trying to start my car but it won'
Hello.
>>error: 'Host 'localhost.domain.ca' is not allowed to connect to this
If MySQL thinks that you're connecting from from 'localhost.domain.ca'
you should have an entry in grant tables for this host. If you're unable
to connect to MySQL as root, reset permissions an add user
'root'@'l
Hello.
I'm not so familiar with Debian, but general rules can be applied
to every Linux distribution. Please, provide exact error messages if
you're getting them from your scripts or describe all aspects of your
problem.
Mester József wrote:
> Hy
>
> I installed a Debian Sarge. E
Marcus Bointon <[EMAIL PROTECTED]> wrote on 11/28/2005 04:45:54
AM:
>
> On 28 Nov 2005, at 00:41, [EMAIL PROTECTED] wrote:
>
> > The only times MySQL server interact directly with each other are:
> > a) during replication
> > b) NDB cluster operations
> > c) FEDERATED tables
> >
> > Options b)
phpMyAdmin has the ability to export to XML format. If you take a look at
its code, you may see what command is used to dump to XML. Specifically, the
code for XML export is in /libraries/export/xml.php. May put you in the
right direction.
Ben
On 11/28/05, prathima rao <[EMAIL PROTECTED]> wrote:
I have not used an 'if' clause in select before but I think I may have a
scenario which calls for it.
I have a table with the following sample data:
idx status1 status2
1"Neg""Neg"
2"Pos""Neg"
3"Neg"NULL
4"Ind""Neg"
I need to write a select clause based on the
prathima rao wrote:
> i was tring mysqldump command line for exporting data to xml format it is
> giving an error can anyone help me with the command line syntax
No -- at least not unless you provide the command you were trying
and the error message. :-)
Especially considering the syntax is as si
i was tring mysqldump command line for exporting data to xml format it is
giving an error can anyone help me with the command line syntax
rao
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
hi all,
has anyone tried to export a data from a table to *.xml format
i want a front end programme to do this automatically
for example
i have a database test in which table testing exists
i want the data from that table to be exported in xml format at a click of a
button
regards
rao
--
On 28 Nov 2005, at 00:41, [EMAIL PROTECTED] wrote:
The only times MySQL server interact directly with each other are:
a) during replication
b) NDB cluster operations
c) FEDERATED tables
Options b) and c) are available only in v5.0+. If what you want to do
doesn't fall into one of those three c
58 matches
Mail list logo