I wanted to know if this is a good place to post
for a project I needed done, If not can someone direct
me to a better place to post it.
Thanks
___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
--
What do you mean?
On Sun, 10 Oct 2004 23:07:59 -0700 (PDT), John [EMAIL PROTECTED] wrote:
I wanted to know if this is a good place to post
for a project I needed done, If not can someone direct
me to a better place to post it.
Thanks
___
Do you
Good idea. liang le's answer almost got it, but I couldn't make it work
with string values quite right. Here is my situation:
I am issuing a series of queries all-in-one like SELECT nameColumn,
otherColumn FROM theDatabase WHERE rowID = 1;SELECT nameColumn, otherColumn
FROM theDatabase WHERE
Hi,
just wanted to know if I can set other indexes on one of my replication
servers that are not on the master server?
This would be a great performance benefit if I use this server for
administrative purpose..
Thanks,
chris
--
MySQL General Mailing List
For list archives:
In article [EMAIL PROTECTED],
Ville Mattila [EMAIL PROTECTED] writes:
When I try to find out the current amount of products in our stock,
and ordered quantities I use this query:
SELECT p.id, SUM(out.quantity) ordered_out, SUM(in.quantity)
ordered_in FROM products p LEFT JOIN outorders out
In article [EMAIL PROTECTED],
John Mistler [EMAIL PROTECTED] writes:
Good idea. liang le's answer almost got it, but I couldn't make it work
with string values quite right. Here is my situation:
I am issuing a series of queries all-in-one like SELECT nameColumn,
otherColumn FROM
This is a pretty weird thing. If you have no rows returned, and want to
taka an action on that,
then the application should check for the case of no rows returned, not
for a specific value. But
if you insist and use MySQL 4.1 (as subqueries are assumed):
SELECT IFNULL((SELECT nameColumn FROM
SELECT nameColumn,
otherColumn, count(*) as flag FROM theDatabase WHERE rowID = 1 group by rowID;
or make a temp table with the IDs and then left join it with
theDatabase and drop temp.
Santino
At 23:27 -0700 10-10-2004, John Mistler wrote:
Good idea. liang le's answer almost got it, but I
Hi all,
I have some doubts about how to implement this kind of scenario:
I have a table of elements in cronological order, let's call it table A:
for every A element, I have a number of elements ordered on a
progressive number.
This could be a simply one-to-many relation, where I can handle a
I think you need to explain what kind of SELECTs you want to do, and what
results you expect. How do you expect to get results from a SELECT which
returns hits in both the B and C tables? If you expect to do this, then
the D table is probably your correct answer. Do you really need a rec_type
Hi,
I'm a bit confused by the lock mechanism under mysql.
When user A does an update on table 1, the table is automatically locked
by mysql?that means at the same time user B won't be able to modify the
same row?
Or do I have to specify the lock for each query?
And what about temporary tables?
I've been subscribed to this mailing list for at least a year now and I
don't remember ever seeing a specific project description on it where
someone was looking for a consultant. However, I don't remember ever hearing
anyone expressing any objection to that either ;-)
I'm not aware of any better
Super-hot flame is on its way already ;-D
By the way, Good morning (in the United States) and Good 'otherwise' to
otherwise ;^)
-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Monday, October 11, 2004 8:18 AM
To: John; mysql
Subject: Re: Website site Database (Project)
G'Day All,
I successfully installed RedHat ES 3.0 and would like to get MySQL
installed on it. After reading the online manual at
dev.mysql.com/doc/mysql/en/Installation_layouts.html I am still a bit
unsure of my next move.
Can some please help me out with directions on how to check the system
You can use rpm --help to find out how to list all rpm packages that are
installed, then when you find out the flag to list them, then do --
rpm -(the flag you found) | grep mysql
OR
if you want to find out if mysql process is running or not then do --
ps -efaux | grep mysql
-Original
Il giorno 11/ott/04, alle 11:53, [EMAIL PROTECTED] ha scritto:
I think you need to explain what kind of SELECTs you want to do, and
what
results you expect.
you're right, I'll try to explain it better
I'm working on a system that must keep track of all the music
broadcasted by a tv,
so, let's
Hi,
It is necessary to post in English (enough with Janglish) so that
a lot of people may understand because it is an international
mailing list. If you hope for the discussion in Japanese,
you can apply for participation in Japanese user group's mailing list
(http://www.mysql.gr.jp/ml.html)
Hi:
I have a problem in that all statements that include concat execute very
slowly. For instance, if I have three fields in string format that represent
a year, month and day, and want to issue a select like:
select * from cxcmanpag where contact
There might be limitation on length of index in mysql
try this
CREATE TABLE `adminpages` (
`adminpageid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`file_name` VARCHAR( 250 ) NOT NULL ,
`page_title` VARCHAR( 250 ) NOT NULL ,
PRIMARY KEY ( `adminpageid` ) ,
INDEX ( `file_name` , `page_title` )
Jonathan Jesse wrote:
As mentioned previously I am a MySQL newbie. I have read most of the Paul
DuBois book and portions I have found relevant of the manual to help me out,
however I have not found an answer to this question, maybe it is not even
needed.
I have used MS Access a lot and one of the
Thanks.
rpm -a | grep mysql
rpm -l | grep mysql
rpm -f | grep mysql
rpm -g | grep mysql
rpm -p | grep mysql
All returned nothing, so I am concluding that MySQL is not installed.
Can you please help me out with steps on how to download and install
MySQL.
Is this by rpm's or gz?
Thanks much
First connect to mysql as root user and issue the following command
grant select on databasename.* to username@ipaddress identified by
'passwd';
flush privileges;
it will grant only select privilege to the newly created user on database
and he can only connect from the ipaddress specified in
You are correct. That is an application-side rule that you will need to
enforce using your application code. MySQL could possibly do this check
but the overhead involved would be severe and your application's
performance would suffer.
Shawn Green
Database Administrator
Unimin Corporation -
On Mon, 2004-10-11 at 14:52, Ferguson, Michael wrote:
Thanks.
rpm -a | grep mysql
rpm -l | grep mysql
rpm -f | grep mysql
rpm -g | grep mysql
rpm -p | grep mysql
All returned nothing, so I am concluding that MySQL is not installed.
There's a q missing, and better do a case-insensitive
You should keep threads on the list. That way, more people can help, and
more can benefit from the answers.
I've not looked at the code behind mysql_get_server_info(), but every
version of mysql I've seen has 3 parts to the version number. It seems
clear that the mysql version numbering
Have you considered NOT comparing dates as strings but rather as date
values? That will avoid the use of CONCAT() completely.
SELECT *
FROM sampletable
WHERE datefield = '1999-01-12' and datefield '1999-02-01'
This example query will get all of the records from sampletable that were
entered
What is the best way to access a specific field in C? Its really easy in
PHP...
PHP
---
$res = mysql_real_query($mysql,SELECT col1, col2 FROM table);
while($row = mysql_fetch_row($res)) {
print $row['col1'];
print $row['col2'];
}
Is the only way/best way to do the above in C by using
My answers interspersed below (and yes, I have read his follow up reply
that had additional information)
Giulio [EMAIL PROTECTED] wrote on 10/11/2004 05:44:43 AM:
Hi all,
I have some doubts about how to implement this kind of scenario:
I have a table of elements in cronological order,
Thanks
-Original Message-
From: Thomas Plümpe [mailto:[EMAIL PROTECTED]
Sent: Monday, October 11, 2004 10:26 AM
To: Ferguson, Michael
Cc: [EMAIL PROTECTED]
Subject: RE: MySQL on RedHat ES 3.0
On Mon, 2004-10-11 at 14:52, Ferguson, Michael wrote:
Thanks.
rpm -a | grep mysql
rpm -l |
I have a resume form that picks consultants by state (such as an html guru
in California, or an SAP expert in Alabama). But what if I want to pick from
ANY state?
When I put in criteria, the SQL comes back like so...
SELECT SQL_CALC_FOUND_ROWS * FROM resume INNER JOIN candidate WHERE
At 11:25 -0400 10/11/04, Eve Atley wrote:
I have a resume form that picks consultants by state (such as an html guru
in California, or an SAP expert in Alabama). But what if I want to pick from
ANY state?
When I put in criteria, the SQL comes back like so...
SELECT SQL_CALC_FOUND_ROWS * FROM
You only need to lock whene you are going to run a query that contains
a series of actions and they all have to happen at the same time. As
for single queries, they are already atomic, so you don't need to put
and locks around them.
On Mon, 11 Oct 2004 11:14:36 +0100, Melanie Courtot [EMAIL
mysqladmin version
On Mon, 11 Oct 2004 10:36:54 -0400, Michael Stassen
[EMAIL PROTECTED] wrote:
You should keep threads on the list. That way, more people can help, and
more can benefit from the answers.
I've not looked at the code behind mysql_get_server_info(), but every
version of
Hi,
I've just accidentally run myisampack (myisampack Ver 1.22) on a table which
I still need to update. Is there anyway I can unpack it?
Thanks,
JS.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
rpm -qa | grep -i mysql
On Mon, 11 Oct 2004 09:12:54 -0400, Ferguson, Michael
[EMAIL PROTECTED] wrote:
G'Day All,
I successfully installed RedHat ES 3.0 and would like to get MySQL
installed on it. After reading the online manual at
dev.mysql.com/doc/mysql/en/Installation_layouts.html I am
Thanks.
Here is what it got after I ran your command. It seems that mysql and
php is already installed. Right???
[EMAIL PROTECTED] root]# rpm -qa | grep -i mysql
libdbi-dbd-mysql-0.6.5-5
mysql-3.23.58-1
perl-DBD-MySQL-2.1021-3
mysql-devel-3.23.58-1
mod_auth_mysql-20030510-1.ent
Run SELECT * FROM user; in the mysql database. All of the options
are obvious.
On Mon, 11 Oct 2004 19:28:49 +0530, Anil Doppalapudi
[EMAIL PROTECTED] wrote:
First connect to mysql as root user and issue the following command
grant select on databasename.* to username@ipaddress identified by
I have some queries that return around 75,000 rows, and I've been trying
to figure out how to speed them up a little. In the course of looking for
the bottleneck, I discovered that simply getting a large result was
considerably slower on OS X.
I tested on a number of machines, with MySQL versions
Yup.
On Mon, 11 Oct 2004 11:33:50 -0400, Ferguson, Michael
[EMAIL PROTECTED] wrote:
Thanks.
Here is what it got after I ran your command. It seems that mysql and
php is already installed. Right???
[EMAIL PROTECTED] root]# rpm -qa | grep -i mysql
libdbi-dbd-mysql-0.6.5-5
mysql-3.23.58-1
Yes, they seems to be installed already.
-Original Message-
From: Ferguson, Michael [mailto:[EMAIL PROTECTED]
Sent: Monday, October 11, 2004 11:34 AM
To: Benjamin Arai
Cc: [EMAIL PROTECTED]
Subject: RE: MySQL on RedHat ES 3.0
Thanks.
Here is what it got after I ran your command.
J S [EMAIL PROTECTED] wrote on 11/10/2004 16:28:41:
I've just accidentally run myisampack (myisampack Ver 1.22) on a table
which
I still need to update. Is there anyway I can unpack it?
myisamchk --unpack table.MYI
http://dev.mysql.com/doc/mysql/en/myisamchk_repair_options.html
Hello,
In C you dont have named access to the columns as they
are returned as an array of char*. The only solution
would be to access it using its index value.
Like PHP, you have to do mysql_fetch_row() anyway.
After that access the row by its index.
If you prefer named access and dont mind a
I've just accidentally run myisampack (myisampack Ver 1.22) on a table
which
I still need to update. Is there anyway I can unpack it?
myisamchk --unpack table.MYI
http://dev.mysql.com/doc/mysql/en/myisamchk_repair_options.html
Alec
Thanks Alec,
I haven't actually run myisamchk -rq
Before you go further, I would like to point out a caution:
When you do a rpm -qa | grep -i mysql
It outputs various packages, not necessarily indicate that mysql itself is
installed, it might mean different things i.e. libraries, perl, php that
supports MySQL. Specifically the output line
J S [EMAIL PROTECTED] wrote on 11/10/2004 16:56:28:
I've just accidentally run myisampack (myisampack Ver 1.22) on a
table
which
I still need to update. Is there anyway I can unpack it?
myisamchk --unpack table.MYI
http://dev.mysql.com/doc/mysql/en/myisamchk_repair_options.html
Dear Matthew,
PHP
---
$res = mysql_real_query($mysql,SELECT col1, col2 FROM
table); while($row = mysql_fetch_row($res)) {
print $row['col1'];
print $row['col2'];
}
Is the only way/best way to do the above in C by using a
nested for-loop?
Ex:
fields =
As far as I know memory usage between the two table types is roughly the
same. The way memory is setup/used is somewhat different however. For
myisam the primary memoy buffer to accelerate queries is the key_buffer
which caches data for keys. In innodb you have more options to set with
the main
Matthew Boehm wrote:
What is the best way to access a specific field in C? Its really easy in
PHP...
http://dev.mysql.com/doc/mysql/en/mysql_fetch_row.html
you won't have the hash-table feature offered by PHP, but nothing stop
you to do the same.
PHP
---
$res = mysql_real_query($mysql,SELECT
Here is another question. Can you achieve the same performance having
to different kinds of databases as though you were only using one? I
am assuming that you are going to run into problems because you cannot
set both types of databases to have a lot of memory allocated to them.
Right?
On
I my network I have 1 master and 4 slaves. I need to squeeze the innodb on
my master; which is the correct way to execute the squeeze action (now the
innodb files is around 1gb, while in a new db is around 300 mB)
thanks
Massimo
-
Massimo
Hi,
sometime ago my boss imported a dump into a base using Cocoa MySQL on
Mac. Unfortunatly he switch the charset from ISO-8859-1 to something
wrong, probably UTF-8. From this time we have such weird characters in
our fields : FerrandiËre instead of Ferrandière, CitÈ instead of Citée
and so
Yes, if you use both table types within a single database then you will
have to split up the memory usage. However, in many databases there are
just one or two tables that use 90% of the disk/memory space. If this
is your situation then you just allocate most of the memory for the
table type
At 11:41 -0400 10/11/04, Jerry Swanson wrote:
I create table and used password
// CHAR(15)
select password('123456');
++
| password('123456') |
++
| 565491d704013245 |
++
//INT(10)
+-+
| password|
Sorry. This should have gone back to the list.
-- Mensaje reenviado --
Subject: Re: MySQL 4.0 and concat
Date: Lun 11 Oct 2004 11:37
From: Alfredo Cole [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
El Lun 11 Oct 2004 08:35, escribió:
Have you considered NOT comparing dates as
A bit of a warning, if the fields are DATETIME rather than DATE, add the
appropriate hours:minutes:seconds to the test
WHERE datetimefield '1999-02-01 23:59:59'. When comparing DATETIME fields
with date strings '00:00:00' is assumed and that can cause problems if one
forgets that.
Have you
Hi,
It is necessary to post in English (enough with Janglish) so that
a lot of people may understand because it is an international
mailing list. If you hope for the discussion in Japanese,
you can apply for participation in Japanese user group's mailing list
(http://www.mysql.gr.jp/ml.html)
This maybe somewhat of a silly question.
Scenario - I am pretty much a noob at both relational
databases and web programming. I've built most of my
pages using a RAD tool that, for the most part, does a
decent job , if you keep it fairly simple.
One of the limitations is inserts updates are
SELECT city, state, SQRT( POWER( (
latitude - 39.039200
), 2 ) + POWER( (
longitude + 95.689508
), 2 ) ) AS distance
FROM geographics
WHERE distance 1
ORDER BY distance
LIMIT 10;
Returns:
#1054 - Unknown column 'distance' in 'where clause'
Are alias not allowed in WHERE clauses?
I am able to
At 11:32 -0700 10/11/04, Nathan Clark wrote:
SELECT city, state, SQRT( POWER( (
latitude - 39.039200
), 2 ) + POWER( (
longitude + 95.689508
), 2 ) ) AS distance
FROM geographics
WHERE distance 1
ORDER BY distance
LIMIT 10;
Returns:
#1054 - Unknown column 'distance' in 'where clause'
Are alias not
Hi,
It is necessary to post in English (enough with Janglish) so that
a lot of people may understand because it is an international
mailing list. If you hope for the discussion in Japanese,
you can apply for participation in Japanese user group's mailing list
(http://www.mysql.gr.jp/ml.html)
On Monday 11 October 2004 11:57 am, Massimo Petrini wrote:
I my network I have 1 master and 4 slaves. I need to squeeze the innodb on
my master; which is the correct way to execute the squeeze action (now the
innodb files is around 1gb, while in a new db is around 300 mB)
thanks
There isnt
If you are saying the user would navigate through multiple pages updating a table on
each page and you want to treat all the updates collectively as one transaction, that
is a bad idea. You want to pass all the data required for a single transaction in one
request so it can be committed or
See interspersed:
--- Joe Audette [EMAIL PROTECTED] wrote:
If you are saying the user would navigate through
multiple pages updating a table on each page and you
want to treat all the updates collectively as one
transaction, that is a bad idea.
I agree, that is what I am trying to not do.
I'm getting an unknown column error for discount with the following query.
Any idea why?
-Ed
SELECT ID, Title, MSRP, Price, round( ( (MSRP - Price) / MSRP) * 100) as
discount
FROM `products`
where discount '10'
limit 10
--
MySQL General Mailing List
For list archives:
I've just accidentally run myisampack (myisampack Ver 1.22) on a
table
which
I still need to update. Is there anyway I can unpack it?
myisamchk --unpack table.MYI
http://dev.mysql.com/doc/mysql/en/myisamchk_repair_options.html
Alec
Thanks Alec,
I haven't actually
Because discount isn't one of:
1) a field on one of the tables your query is based on
2) a formula based on one or more of the fields from one or more of the
tables your query is based on.
What it is: an alias to the results of a function applied to 2 fields on
one of your tables.
Since the
Great explanation. By the way, Ed, what you might be looking
for is the HAVING clause, which culls records right before
the LIMIT is applied.
SELECT ID, Title, MSRP, Price, round( ( (MSRP - Price) / MSRP) * 100) as
discount
FROM `products`
HAVING discount 10
LIMIT 10
Note that this is, by
Well, it might not be SQL standard, but most databases out there allow
you to use the alias in your where clauses. It helps make the sql more
readable, and it shouldn't be that hard to add this feature to the
parser, so it can translate that alias back to the original row-source
selection,
Interesting. I thought you could sort by aliases. Thanks Shawn.
The easy answer was to just add the calculation to the where section as
well. But which approach is faster - having or the calculation?
Ie.
select ID, Title, MSRP, Price, round( ( (MSRP - Price) / MSRP) * 100) as
discount from
Ah. Well that's a different question. You can, in fact, use
aliases in ORDER BY (and GROUP BY):
SELECT ID, Title, MSRP, Price, round( ( (MSRP - Price) / MSRP) * 100) AS
discount
FROM products
ORDER BY discount ASC
LIMIT 10
Now, regarding HAVING, I would imagine the HAVING clause
would be faster,
You may use Alias's if you use HAVING instead of WHERE this is one of
the defined difrerences between the two clauses. Having is also slower
and will not be optimized, but if you are placing a complex function
like this in your where you obviously aren't expecting great speed.
John
On Mon,
Sorry, mailed it in html format. Read answer below
Original Message
Subject:Re: Where clause question
Date: Tue, 12 Oct 2004 00:00:12 +0200
From: Morten Egan [EMAIL PROTECTED]
To: Ed Lazor [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Not knowing how the inards of
hello,
i'm just looking for some examples of a customer table that some of you
are using for your ecomm sites (or any site that would need a customer
table).
here is mine so far:
(horrible wrapping to follow...)
mysql describe customers;
I have been reading and researching ways to create a failover system for
our MySQL databases that require as little intervention as possible.
However I am having trouble coming up with a way to get the system back
into a stable state after a failover has occurred and the main master has
been
I'm trying to create a single UPDATE query to deal with the following problem:
==
-- I've got two tables:
CREATE TABLE `banannas` (
`owner` varchar(15) NOT NULL default ''
);
CREATE TABLE `monkeys` (
`name` varchar(15) default
Hi Gerald,
try ALTER IGNORE TABLE.
Thank you very much. I should have checked the manual first.
http://dev.mysql.com/doc/mysql/en/ALTER_TABLE.html
IGNORE is a MySQL extension to standard SQL. It controls how ALTER TABLE
works if there are duplicates on unique keys in the new table. If IGNORE
According to the manual http://dev.mysql.com/doc/mysql/en/UPDATE.html, the
multi-table UPDATE syntax is
UPDATE [LOW_PRIORITY] [IGNORE] tbl_name [, tbl_name ...]
SET col_name1=expr1 [, col_name2=expr2 ...]
[WHERE where_definition]
so, you can join tables, but you can't GROUP BY.
You
Quoting Michael Stassen [EMAIL PROTECTED]:
According to the manual http://dev.mysql.com/doc/mysql/en/UPDATE.html, the
multi-table UPDATE syntax is
UPDATE [LOW_PRIORITY] [IGNORE] tbl_name [, tbl_name ...]
SET col_name1=expr1 [, col_name2=expr2 ...]
[WHERE where_definition]
so,
78 matches
Mail list logo