RE: totalizing of Rows please help!!

2006-04-25 Thread Nicolas Verhaeghe
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

Re: mysqldump and foreign keys

2006-04-25 Thread Frank
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

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Daevid Vincent
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

Re: Individual Row Addition ((!!!help!!)

2006-04-25 Thread Barry
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 ,,

Top N selections + rest row

2006-04-25 Thread C.R.Vegelin
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

Re: Top N selections + rest row

2006-04-25 Thread Barry
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

Re: Top N selections + rest row

2006-04-25 Thread Martijn Tonies
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

Re: Top N selections + rest row

2006-04-25 Thread C.R.Vegelin
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

Re: Top N selections + rest row

2006-04-25 Thread Shawn Green
--- 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

Re: Top N selections + rest row

2006-04-25 Thread Martijn Tonies
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

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Gmail User
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_!?

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Gmail User
... 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]

Re: Top N selections + rest row

2006-04-25 Thread Joerg Bruehe
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

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Tim Lucia
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

Stumped again by joins

2006-04-25 Thread Chris Sansom
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

Re: Top N selections + rest row

2006-04-25 Thread C.R.Vegelin
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];

Accumilating Blog Comments

2006-04-25 Thread -Patrick
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`

Re: mysqldump and foreign keys

2006-04-25 Thread Nico Rittner
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?

Re: Top N selections + rest row

2006-04-25 Thread C.R.Vegelin
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

Re: Stumped again by joins

2006-04-25 Thread Barry
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

Re: Accumilating Blog Comments

2006-04-25 Thread Barry
-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

Re: Stumped again by joins

2006-04-25 Thread Chris Sansom
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

INNODB database size

2006-04-25 Thread Todd Smith
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

Accumilating Blog Comments

2006-04-25 Thread -Patrick
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]

Re: INNODB database size

2006-04-25 Thread Pure Web Solution
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:

Re: INNODB database size

2006-04-25 Thread Gary Richardson
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

Re: Error wiht VB 5 and MySQL

2006-04-25 Thread Daniel da Veiga
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

Re: what is this? -- errno=2006 errmsg=Server gone

2006-04-25 Thread Daniel da Veiga
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

Re: Accumilating Blog Comments

2006-04-25 Thread Daniel da Veiga
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

How to get result set from stored procedure?

2006-04-25 Thread Juri Shimon
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());

Re: How to get result set from stored procedure?

2006-04-25 Thread Juri Shimon
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

Re: Accumilating Blog Comments

2006-04-25 Thread -Patrick
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 '',

Re: Top N selections + rest row

2006-04-25 Thread Joerg Bruehe
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

Re: Stumped again by joins

2006-04-25 Thread Chris Sansom
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,

Accumilating Blog Comments

2006-04-25 Thread -Patrick
$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

mysqld vs. mysql-max

2006-04-25 Thread Payne
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:

RE: Newbie Locking Question

2006-04-25 Thread David T. Ashley
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

Re: Stumped again by joins

2006-04-25 Thread gerald_clark
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

Re: Accumilating Blog Comments

2006-04-25 Thread Philippe Poelvoorde
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

Re: Stumped again by joins

2006-04-25 Thread Philippe Poelvoorde
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

mysqldump and table exclusion

2006-04-25 Thread Philippe Poelvoorde
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]

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Nicolas Verhaeghe
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

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Jay Blanchard
[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;

help with SELECT BETWEEN

2006-04-25 Thread Chris
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

Re: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Webmaster
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:

RE: Return virtual records

2006-04-25 Thread Ed Reed
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. -

Re: mysqldump and table exclusion

2006-04-25 Thread Kishore Jalleda
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

Re: help with SELECT BETWEEN

2006-04-25 Thread Chris White
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

Re: Stumped again by joins

2006-04-25 Thread Chris Sansom
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

Datatype MEDIUMTEXT

2006-04-25 Thread Tommy Nordgren
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] --

is not not valid floating point for field

2006-04-25 Thread Gabriel Mahiques
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

Re: mysqldump and table exclusion

2006-04-25 Thread Philippe Poelvoorde
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

Re: help with SELECT BETWEEN

2006-04-25 Thread Shawn Green
--- 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.

Import from unknown format (.bdd .ind .mor .ped)

2006-04-25 Thread Pedro mpa
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

Re: Accumilating Blog Comments

2006-04-25 Thread -Patrick
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

RE: Return virtual records

2006-04-25 Thread Shawn Green
--- 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

Undeleting an entire Database?

2006-04-25 Thread clint lenard
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

RE: Datatype MEDIUMTEXT

2006-04-25 Thread Tim Lucia
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

Re: (Errcode: 13) after moving data directory

2006-04-25 Thread boll
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

innodb file per table

2006-04-25 Thread Duzenbury, Rich
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

Re: Stumped again by joins

2006-04-25 Thread Peter Brawley
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

Re: Accumilating Blog Comments

2006-04-25 Thread Peter Brawley
-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

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Daevid Vincent
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

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Daevid Vincent
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

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Jay Blanchard
[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

need help for my jointure

2006-04-25 Thread Patrick Aljord
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?

Re: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Peter Brawley
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,

RE: Calculate LONG/LAT from ZIP+4 (positve vs. negative longitude)

2006-04-25 Thread Logan, David (SST - Adelaide)
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

Re: mysqldump and foreign keys

2006-04-25 Thread Frank
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

Re: need help for my jointure

2006-04-25 Thread Rhino
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

Re: mysqldump and foreign keys

2006-04-25 Thread Nico Rittner
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