i have three Values in each row of my MySQL database, im needing to sum
them in the table as they are displayed per Row ?? how do i do this ?
Projectname Elecremain Controlremainotherremain
?php ?
Project1 2300 1600
250
Nico Rittner wrote:
hi,
are you using the InnoDB storage engine for your tables?
yes, i do.
example:
$ mysqldump -d core groups :
CREATE TABLE `groups` (
`id` smallint(5) unsigned NOT NULL default '0',
`name` varchar(32) NOT NULL default '',
`parent_id` smallint(5) unsigned
I'm so confused. I'm finally getting around to needing to do a 'store
locator' thing.
I procured myself some zip/lat/long databases from various places. Then I
noticed that for the same zip code, I got different values in different
databases??!!!
So for a sanity check, I decided to look online
Brian E Boothe wrote:
well i have this $sql2=SELECT ordernumber,Elecrem, CtrlProjrem,
OthrProjrem SUM(Elecrem+CtrlProjrem+OthrProjrem) AS btstotal9 FROM
orders GROUP BY ordernumber ORDER BY ordernumber;
only add's up the first row it hits and adds it to the remaining
rows ,,
Hi All,
Anybody with smart ideas to get Top-N rows plus the rest row ?
Suppose I have ranked sales values descending for 2005, like:
Select Country, Sum(Sales) AS Sales From myTable
Where Year=2005 Group By Country
Order By Sales DESC LIMIT 25;
Then I get Top-25 sales rows, but I also want a
C.R.Vegelin wrote:
Hi All,
Anybody with smart ideas to get Top-N rows plus the rest row ?
Suppose I have ranked sales values descending for 2005, like:
Select Country, Sum(Sales) AS Sales From myTable
Where Year=2005 Group By Country
Order By Sales DESC LIMIT 25;
Then I get Top-25 sales
Hi,
Anybody with smart ideas to get Top-N rows plus the rest row ?
Suppose I have ranked sales values descending for 2005, like:
Select Country, Sum(Sales) AS Sales From myTable
Where Year=2005 Group By Country
Order By Sales DESC LIMIT 25;
Then I get Top-25 sales rows, but I also want a rest
Thanks Martijn, Barry,
I was wondering whether it could be done in a single query.
I want users to decide how many countries they want,
and show world sales on top of report followed by the N countries.
This to enable relative country shares, both for reporting and graphs.
For example, Top-10
--- C.R.Vegelin [EMAIL PROTECTED] wrote:
Thanks Martijn, Barry,
I was wondering whether it could be done in a single query.
I want users to decide how many countries they want,
and show world sales on top of report followed by the N countries.
This to enable relative country shares, both
Thanks Martijn, Barry,
I was wondering whether it could be done in a single query.
I want users to decide how many countries they want,
and show world sales on top of report followed by the N countries.
This to enable relative country shares, both for reporting and
graphs.
For
On Tue, 2006-04-25 at 00:43 -0700, Daevid Vincent wrote:
So for a sanity check, I decided to look online and punch in some to see
what the real lat/long should be. Well, different sites give different
values, and not only are they slightly off, but sometimes they're
_positive_ or _negative_!?
... err, as would be South...
N+, S-, E+, W-
Ed :-)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Hi Shawn, Cor, all!
Shawn Green wrote:
--- C.R.Vegelin [EMAIL PROTECTED] wrote:
Thanks Martijn, Barry,
I was wondering whether it could be done in a single query.
I want users to decide how many countries they want,
and show world sales on top of report followed by the N countries.
This to
Read these
http://en.wikipedia.org/wiki/Longitude
http://en.wikipedia.org/wiki/Lattitude
And no, you cannot drive my yacht ;-)
-Original Message-
From: Gmail User [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 25, 2006 9:05 AM
To: mysql@lists.mysql.com
Subject: RE: Calculate LONG/LAT
As a relative newbie, and an almost total newbie to the use of left
joins, I'm aware that there's some difference in the way joins work
between MySQL 3.x and 5.x, but in my ignorance I can't figure out
what the heck it is from reading the 'upgrading' pages on
dev.mysql.com.
When I first
Thanks Shawn,
According: http://dev.mysql.com/doc/refman/5.0/en/group-by-modifiers.html:
When you use ROLLUP, you cannot also use an ORDER BY clause to sort the
results. ...
Regards, Cor
- Original Message -
From: Shawn Green [EMAIL PROTECTED]
To: C.R.Vegelin [EMAIL PROTECTED];
Hi Folks,
Here is the table for the articles:
CREATE TABLE `blg_article_art` (
`id_art` int(11) NOT NULL auto_increment,
`idtop_art` int(11) NOT NULL default '0',
`title_art` varchar(100) NOT NULL default '',
`description_art` blob NOT NULL,
`text_art` longtext NOT NULL,
`date_art`
Hallo,
Sorry to ask this questions, but are you confident that the action clauses
work properly, i.e. the tables were created correctly?
In the case of a crash i need to restore the dump including
the on delete/update clauses.
What do you see when you execute show create table groups?
Hi Joerg, All,
I would like to have something like:
Country Type20042005
--
GermanySales13357 19843
Belgium Sales12224 16767
France Sales15443 16602
Un. States Sales11995 14332
Japan
Chris Sansom schrieb:
As a relative newbie, and an almost total newbie to the use of left
joins, I'm aware that there's some difference in the way joins work
between MySQL 3.x and 5.x, but in my ignorance I can't figure out what
the heck it is from reading the 'upgrading' pages on
-Patrick schrieb:
Hi Folks,
Here is the table for the articles:
CREATE TABLE `blg_article_art` (
`id_art` int(11) NOT NULL auto_increment,
`idtop_art` int(11) NOT NULL default '0',
`title_art` varchar(100) NOT NULL default '',
`description_art` blob NOT NULL,
`text_art` longtext NOT
At 15:56 +0200 25/4/06, Barry wrote:
Updating is always such a bad idea ;P
Do you know: never touch a running system? ^_^
Hmmm...
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Yes, they look just fine - in any case they're unchanged from when it
Hello
I have inherited an INNODB database. I am new to MySQL and may not be
describing my problem correctly so any suggestions or questions are welcome.
I have data files named ib_data_00 through ib_data_14 all of which are 2.0G.
I also have ib_data_15 which is 26G. I am receiving errors saying
Sorry about that..
$totalrows_rsComments gives a value of 0. But no matter what I do I
can't seem to alter it. It stays at zero.
-Patrick
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Todd
you need to look at how InnoDB is configured and learn a bit about how Innodb
uses and manages its tablespace. if you look in the my.ini options file you
should see how innodb is set up for your installation. Take a look at the
link below that explains how InnoDB can be set up:
Look at your my.cnf for a configuration directive called
'innodb_data_file_path'. This is where you configure the files for the
innodb table space. The last one is probably an auto-grow. My guess is that
every time it complains, it's just added 8MB to the file. If you remove the
auto-grow (and I
On 4/24/06, Gabriel Mahiques [EMAIL PROTECTED] wrote:
but, when the fields are float type, this error don't happen. When the
fileds are float the result is the correct (if I have 1.2569 in the
table, in the application I see 1.2569.)
Ok, so, I didn't quite understand. Let me see, you can see
On 4/17/06, Martin Olsson [EMAIL PROTECTED] wrote:
This is software I use:
D:\MDmysql --version
mysql Ver 14.7 Distrib 4.1.12, for Win32 (ia32)
Upgrade your MySQL version to the last 4.1.x release. I had problems
like this when issuing specific queries on 4.1.12. The problem was
gone after
On 4/25/06, -Patrick [EMAIL PROTECTED] wrote:
Hi Folks,
Here is the table for the articles:
CREATE TABLE `blg_article_art` (
`id_art` int(11) NOT NULL auto_increment,
`idtop_art` int(11) NOT NULL default '0',
`title_art` varchar(100) NOT NULL default '',
`description_art` blob NOT
Hello mysql,
May be, I'm a stupid...
create procedure test () select 1;
mysql call test();
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.05 sec)
In C:
mysql=mysql_init(NULL);
mysql_real_connect(mysql, NULL, User, pwd, test, MYSQL_PORT, NULL, 0);
mysql_query(mysql, call test());
Hello Juri,
Tuesday, April 25, 2006, 5:49:25 PM, you wrote:
JS mysql=mysql_init(NULL);
JS mysql_real_connect(mysql, NULL, User, pwd, test, MYSQL_PORT, NULL, 0);
JS mysql_query(mysql, call test());
JS results to error: PROCEDURE test.test can't return a result set in the
given context
JS
Daniel da Veiga wrote:
On 4/25/06, -Patrick [EMAIL PROTECTED] wrote:
Hi Folks,
Here is the table for the articles:
CREATE TABLE `blg_article_art` (
`id_art` int(11) NOT NULL auto_increment,
`idtop_art` int(11) NOT NULL default '0',
`title_art` varchar(100) NOT NULL default '',
Hi Cor, all!
C.R.Vegelin wrote:
Hi Joerg, All,
I would like to have something like:
Country Type20042005
--
GermanySales13357 19843
Belgium Sales12224 16767
France Sales15443 16602
Un. States Sales
At 15:56 +0200 25/4/06, Barry wrote:
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Hi Barry
I was wrong about its being a PHP issue: it's
definitely a MySQL error. I realised I hadn't
handled the error in such a way that I could see
what it was,
$query_rsComments = sprintf(SELECT id_com WHERE idart_com=%s ORDER BY
date_com ASC, $KTColParam1_rsComments);
can anyone see what Im trying to do here? basically, I want to match the
id_com with an idart_com to produce a value and report back through the
other chunk of code already given to
Hey,
I got a box that is dying, it is currently running MySQL-Max, I want to
move the DB from it to a box that is running just plain jane MySQL, what
will happen and will it work.
I know, strange but I am not sure what the Max does.
Payne
--
MySQL General Mailing List
For list archives:
Nigel wrote:
mod_php will persist the MySQL connection holding open any lock or
syncronisation token obtained through any of the three methods :
begin/commit, lock/unlock tables or get_lock/release_lock. PHP does
ensure that even in the event of timeouts or fatal errors any shutdown
Chris Sansom wrote:
At 15:56 +0200 25/4/06, Barry wrote:
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Hi Barry
I was wrong about its being a PHP issue: it's definitely a MySQL
error. I realised I hadn't handled the error in such a way that I
2006/4/25, -Patrick [EMAIL PROTECTED]:
$query_rsComments = sprintf(SELECT id_com WHERE idart_com=%s ORDER BY
date_com ASC, $KTColParam1_rsComments);
can anyone see what Im trying to do here? basically, I want to match the
id_com with an idart_com to produce a value and report back through
2006/4/25, Chris Sansom [EMAIL PROTECTED]:
At 15:56 +0200 25/4/06, Barry wrote:
And you don't see any misdone queries when you echo them, right?
Hope you checked that.
Hi Barry
I was wrong about its being a PHP issue: it's
definitely a MySQL error. I realised I hadn't
handled the error in
Hi,
I've read the manual, but it seems there is not the option I'm looking for.
I would like to dump all tables but one. Is that possible ?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
I'm so confused. I'm finally getting around to needing to do a 'store
locator' thing.
I procured myself some zip/lat/long databases from various places. Then I
noticed that for the same zip code, I got different values in different
databases??!!!
So for a sanity check, I decided to look online
[snip]
I procured myself some zip/lat/long databases from various places. Then
I
noticed that for the same zip code, I got different values in different
databases??!!!
[/snip]
Latitudes and longitudes are often represented based on their location
relative to the equator and the prime meridian;
I want to create a SELECT statement using BETWEEN like:
SELECT * FROM mytable WHERE myfield BETWEEN value_1 AND value_2. The field
I'm applying my BETWEEN clause is a varchar.
Now, if value_1 and value_2 are numbers the select statement works as is. If
value_1 and value_2 are characters I need
Hello,
Not wanting to hijack this thread, but what is the best source for a
zip code database? The best free one I could find was from census
data from the last census. Sometimes it won't recognize all the zips
from large cities.
Thanks,
R
--
MySQL General Mailing List
For list archives:
Thanks for the response Shawn but there's nothing covert here. I really need a
list of partnumbers based on the Sum of that part in the table. My users will
be marking off the parts in the list and if there a more than one of a
partnumber then it needs to show up in the list more than once.
-
There is an option to ignore tables from being dumped
--ignore-table=*db_name.tbl_name*
Do not dump the given table, which must be specified using both the database
and table names. To ignore multiple tables, use this option multiple times.
so you would say
#mysqldump -uuser -ppassword
On Tuesday 25 April 2006 09:33 am, Chris wrote:
I want to create a SELECT statement using BETWEEN like:
SELECT * FROM mytable WHERE myfield BETWEEN value_1 AND value_2. The field
I'm applying my BETWEEN clause is a varchar.
If the appropriate format (enclosing or not enclosing with
At 11:10 -0500 25/4/06, gerald_clark wrote:
Yes. 3.23 was not correct in the order of precedence.
This has been answered many times here.
Sorry - I haven't been on the list all that long.
You need to change your comma join to an inner join.
Lovely! That's it - many thanks.
At 17:15 +0100
do MySQL store this in fixed-size or variable-sized fisk space?
I need to be able to store large fields, but usually the size will be
just a few kilobytes.
-
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
[EMAIL PROTECTED]
--
Hi friends.
I have another problems with database migration from MySQL 4 to MySQL 5.
We have many applications developments in Visual Basic 5. Under Mysql 4
if I put , (comma) for decimal value (we are in Argentina and we use
comma for decimal separation) and war a valid value.
When we migrated
2006/4/25, Kishore Jalleda [EMAIL PROTECTED]:
There is an option to ignore tables from being dumped
--ignore-table=db_name.tbl_name
Excellent :-) My man page is not up-to-date, and wasn't showing it. thanks
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To
--- Chris [EMAIL PROTECTED] wrote:
I want to create a SELECT statement using BETWEEN like:
SELECT * FROM mytable WHERE myfield BETWEEN value_1 AND value_2. The
field
I'm applying my BETWEEN clause is a varchar.
Now, if value_1 and value_2 are numbers the select statement works as
is.
Greetings.
I'm building an application and I need to import data to mysql from a db
format I don't know. Unfortunately the person in charge of the data won't be
reachable for the next 2 weeks and I want to continue my work.
I was wondering if anyone knows the format extensions like:
.bdd
Philippe Poelvoorde wrote:
2006/4/25, -Patrick [EMAIL PROTECTED]:
$query_rsComments = sprintf(SELECT id_com WHERE idart_com=%s ORDER BY
date_com ASC, $KTColParam1_rsComments);
can anyone see what Im trying to do here? basically, I want to match the
id_com with an idart_com to produce a
--- Ed Reed [EMAIL PROTECTED] wrote:
Thanks for the response Shawn but there's nothing covert here. I
really need a list of partnumbers based on the Sum of that part in
the table. My users will be marking off the parts in the list and if
there a more than one of a partnumber then it needs to
Hey guys,
Well, I was unable to find anything on Google and I don't expect to find a
miracle... but I figured why not.
On Sunday morning I was trying to delete a Table through PHPMyAdmin and
well... I dropped the entire DB without backing it up before. Stupid
mistake, I know.
So, I'm using
http://dev.mysql.com/doc/refman/5.0/en/blob.html
http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
-Original Message-
From: Tommy Nordgren [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 25, 2006 1:27 PM
To: mysql@lists.mysql.com
Subject: Datatype MEDIUMTEXT
do MySQL
boll wrote:
Dominik Klein wrote:
Did you check FAT-permissions?
When mounting a FAT-partition, you have to set explicit permissions
while mounting as FAT does not understand the unix permission concept.
Try to mount this way:
mount -t vfat -o uid=mysql,gid=mysql,rw,umask=007
Hi all,
I've inherited an innodb database that is configured like:
innodb_file_per_table
innodb_data_file_path =
ibdata1:3000M;ibdata2:3000M;ibdata3:3000M;ibdata4:3000M:autoextend
Um, doesn't this allocate 12G that winds up being unused, since
innodb_file_per_table is set? If so, what is the
Chris,
select count(distinct uid) as c
from aptg_guides_restricted as r, aptg_guides as g
...snip...
See the extensive notes on comma and SQL2003 joins at
http://dev.mysql.com/doc/refman/5.1/en/join.html.
Lose the comma join, make it a SQL2003 (explicit inner) join.
PB
-
At 15:56 +0200
-Patrick wrote:
$query_rsComments = sprintf(SELECT id_com WHERE idart_com=%s ORDER BY
date_com ASC, $KTColParam1_rsComments);
No FROM clause. Also, don't you need single quotes around %s?
PB
-
can anyone see what Im trying to do here? basically, I want to match the
id_com with an
Thanks for the graph.
So are you saying that I should use the database that has the negative
values,
and not the one that uses positive values?
I'm in the USA. I don't care about anywhere else (for my location needs that
is).
-Original Message-
From: Jay Blanchard [mailto:[EMAIL
My confusion is that I have some formulas to plug in these values, but it
seems to me that if I use the wrong set of data, my zipcodes will be wrong
too. I also don't understand why there is even such a difference. I can
understand a few decimal points being different, but I don't understand how
[snip]
Thanks for the graph.
So are you saying that I should use the database that has the negative
values,
and not the one that uses positive values?
I'm in the USA. I don't care about anywhere else (for my location needs
that
is).
[/snip]
Yes, that would be using the proper notation for lat
I have a table confs like this:
id int 5 auto_increment primary key;
conf text;
and another table conf_ip like this:
id int 5 auto_increment primary key;
conf_id int 5; ==foreing key of confs
ip varchar 150;
I would like to
select id, conf from confs where ip!='some val';
how can I do this?
Daevid Vincent wrote:
My confusion is that I have some formulas to plug in these values, but it
seems to me that if I use the wrong set of data, my zipcodes will be wrong
too. I also don't understand why there is even such a difference. I can
understand a few decimal points being different,
You could further explain the lats and longs being slightly off by the
use of a different datum. There are many many datums utilised by
different geographical/geological authorities. This difference could
become quite large dependent upon the datum used.
As gmail user as noted, negative = West
Nico Rittner wrote:
Hallo,
Sorry to ask this questions, but are you confident that the action
clauses work properly, i.e. the tables were created correctly?
In the case of a crash i need to restore the dump including
the on delete/update clauses.
What do you see when you execute show
First of all, I'm going to guess that English is not your first language and
tell you that jointure is not the word normally to describe the process of
combining two tables in a database: the word you want is joining.
Second, there are many kinds of joins and you haven't specified which kind
Hi Frank
what I meant was: are you sure that the tables which are in your database
are defined correctly, i.e. have the actions?
Yes, if i try to delete or update a record which is referenced by another
i get mysql error #1217 , which should be correct.
might have been lost somewhere. Can
71 matches
Mail list logo