RE: Duplicate entry error

2005-07-02 Thread anurag.dashputre

Gleb,
Thanks for your suggestions.
I would like to know
1.How to send MySQL versions on master and slave.
2.Where I have to include output of 'SHOW SLAVE STATUS'.
3.How to Fix the problem if it does occurs.
4.How to restart the slave SQL thread with SLAVE START.

Thanks again for your help and cooperation.

Anurag


-Original Message-
From: Gleb Paharenko [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 30, 2005 3:20 PM
To: mysql@lists.mysql.com
Subject: Re: Duplicate entry error


Hello.

Please examine your master's binary and slave's relay logs with
mysqlbinlog utility to find if sent and received SQL statements are
different. Sent your MySQL versions on master and slave. Include
complete output of 'SHOW SLAVE STATUS'. If your version is rather old,
check if the problem remains after upgrade.



[EMAIL PROTECTED] wrote:

 Hi all,
 I am getting duplicate entry error while inserting data in the table.
 My table name is TEMP and it contains only one field which is primary
 key= ,nt null as well as auto increment .

 050628 16:05:00  Slave: Error 'Duplicate entry '77' for key 1' on
 query 'INSERT INTO TEMP VALUES ()'. Default database: 'our database
 name is=
 here', Error_code: 1062
 050628 16:05:00  Error running query, slave SQL thread aborted.=0D Fix

 the problem, and restart the slave SQL thread with SLAVE START. We=
 stopped at log 'log-bin.018' position 37918

 I have a master slave setup.So slave database has entries upto 77 only

 but= master database has entries upto 114. If I again start inesrting
 entries then entries in slave database will= start from 115 which is
 really danagerous for me.

 I couldn't understand the statement=0D

 Fix the problem, and restart the slave SQL thread with SLAVE START.

 Can anybody help me in solving this issue ?

 Thanks and Regards,
 Anurag


 -Original Message-
 From: Johan H=F6=F6k [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 30, 2005 2:01 PM
 To: [EMAIL PROTECTED]
 Cc: Siegfried Heintze; mysql@lists.mysql.com
 Subject: Re: Wanted: Help with 'ON DUPLICATE KEY' syntax


 Hi Jocelyn,
 you're right of course. I didn't read the original post closely enough

 (it's early in the morning here...). I missed that SELECT wasn't used.

 Regards,
/Johan

 [EMAIL PROTECTED] wrote:
 Hi Johan,
=0D
 I don't think it's its problem, since MySQL returns a You have an=0D

error in your SQL syntax. error, and not those specified in this
bug=0D  report. This means the SQL parser failed to understand its
query. =0D  Regards,
   Jocelyn
=0D
=0D
Hi Siegfried,
I think you've run into bug #8732:
...
Description:
if you do a INSERT INTO table (col_list) SELECT ... ON DUPLICATE
KEY=0D UPDATE and refer to the same column in the col_list and in the

UPDATE=0D clause, it will bail out, doesn't seem like it should,
since not listing the column in the INSERT
list will make it work.
...

I've run into it myself on 4.1.12.

/Johan

Siegfried Heintze wrote:

Thanks for deciphering that terrible message, Shawn. I
accidentally=0D must have hit the paste key too many times.

Anyway, here is my new insert statement:


INSERT INTO jobtitlecount (fkJobPosting, dtSnapShot, cJobTitle)=0D
VALUES
(211584,'2005-06-26',2) ON DUPLICATE KEY UPDATE cJobTitle=3D2


DBD::mysql::st execute failed: You have an error in your SQL
syntax.=0D Check the manual that corresponds to your MySQL server
version for=0D the right syntax to use near 'ON DUPLICATE KEY UPDATE

cJobTitle=3D2' at=
 =0D
line 1 at ./crawl-hot-jobs.pl line 675.



I'm looking at the documentation on=0D
http://dev.mysql.com/doc/mysql/en/insert.html and I don't see what
I=0D am doing wrong.

Thanks,
Siegfried




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=
 [EMAIL PROTECTED]
=0D
=0D
=0D
=0D




 Confidentiality Notice=0D

 The information contained in this electronic message and any
 attachments to= this message are intended for the exclusive use of the

 addressee(s) and may contain confidential or= privileged information.
 If you are not the intended recipient, please notify the sender at
 Wipro or= [EMAIL PROTECTED] immediately
 and destroy all copies of this message and any attachments.



--
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please 

Re: Some query help

2005-07-02 Thread Mathias
Selon [EMAIL PROTECTED]:

 Matt Babineau [EMAIL PROTECTED] wrote on 07/01/2005 05:05:28 PM:

  Hi Again -
 
  I need some more help with a query. I have a list of numbers (bandwidth
  required)... 2200, 2200, 2200, 400, 320
 
  My data looks like this:
 
  Bandwidth | Distance
  
  2250  | 10km
  1125  | 10km
  622   | 10km
  2250  | 20km
  1125  | 20km
  622   | 20km
  2250  | 40km
  1125  | 40km
  622   | 40km
 
  I need the query to look at the list of numbers,  and figure out that a
  certain distance has Bandwidths that are greater than each of the
 numbers.
 
  SELECT DISTINCT(distance) FROM fiber_config WHERE fiber_type = 2 AND
  bandwidth  (2200, 2200, 2200, 220) ORDER BY distance ASC
 
  So I hope you can see what I am trying to get after. Basically I need to
  fins a distance that can fit each of the numbers in the list. So if 2200
 is
  in the list, 2250 works. If 400 is in the list, 622 works. Thanks for
 the
  help on this!
 
 
 
  Thanks,
 
  Matt Babineau
  Criticalcode
  858.733.0160
  [EMAIL PROTECTED]
  http://www.criticalcode.com
 
 Actually, no. I can't see what you are trying to get after. I don't have
 enough context to work from.

 I just cannot visualize your problem well enough to help. What is the
 tuple/list of numbers (2200,2200,2200,220) supposed to represent and how
 would you use this list to find the records you wanted if you were doing
 it by hand?

 Imagine for me that none of this information is in a computer but has been
 printed out on paper. Now describe for me the decision process you want to
 perform and how I would do it using the printed lists. What would I need
 to compare to come up with the correct choices?

 Make sure you respond to the list so that everyone else can help, too!

 Shawn Green
 Database Administrator
 Unimin Corporation - Spruce Pine

Hi Matt,
 SELECT DISTINCT(distance) FROM fiber_config WHERE fiber_type = 2 AND
 bandwidth  min(2200, 2200, 2200, 220) ORDER BY distance ASC



Hope that helps
:o)
Mathias

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Some query help

2005-07-02 Thread Mathias
Selon Mathias [EMAIL PROTECTED]:

 Selon [EMAIL PROTECTED]:

  Matt Babineau [EMAIL PROTECTED] wrote on 07/01/2005 05:05:28 PM:
 
   Hi Again -
  
   I need some more help with a query. I have a list of numbers (bandwidth
   required)... 2200, 2200, 2200, 400, 320
  
   My data looks like this:
  
   Bandwidth | Distance
   
   2250  | 10km
   1125  | 10km
   622   | 10km
   2250  | 20km
   1125  | 20km
   622   | 20km
   2250  | 40km
   1125  | 40km
   622   | 40km
  
   I need the query to look at the list of numbers,  and figure out that a
   certain distance has Bandwidths that are greater than each of the
  numbers.
  
   SELECT DISTINCT(distance) FROM fiber_config WHERE fiber_type = 2 AND
   bandwidth  (2200, 2200, 2200, 220) ORDER BY distance ASC
  
   So I hope you can see what I am trying to get after. Basically I need to
   fins a distance that can fit each of the numbers in the list. So if 2200
  is
   in the list, 2250 works. If 400 is in the list, 622 works. Thanks for
  the
   help on this!
  
  
  
   Thanks,
  
   Matt Babineau
   Criticalcode
   858.733.0160
   [EMAIL PROTECTED]
   http://www.criticalcode.com
  
  Actually, no. I can't see what you are trying to get after. I don't have
  enough context to work from.
 
  I just cannot visualize your problem well enough to help. What is the
  tuple/list of numbers (2200,2200,2200,220) supposed to represent and how
  would you use this list to find the records you wanted if you were doing
  it by hand?
 
  Imagine for me that none of this information is in a computer but has been
  printed out on paper. Now describe for me the decision process you want to
  perform and how I would do it using the printed lists. What would I need
  to compare to come up with the correct choices?
 
  Make sure you respond to the list so that everyone else can help, too!
 
  Shawn Green
  Database Administrator
  Unimin Corporation - Spruce Pine
 
 Hi Matt,
  SELECT DISTINCT(distance) FROM fiber_config WHERE fiber_type = 2 AND
  bandwidth  min(2200, 2200, 2200, 220) ORDER BY distance ASC



 Hope that helps
 :o)
 Mathias

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



errata :
 Hi Matt,
  SELECT DISTINCT(distance) FROM fiber_config WHERE fiber_type = 2 AND
  bandwidth  least(2200, 2200, 2200, 220) ORDER BY distance ASC


least not min coz it's a row data, not column one.

Hope that helps
:o)
Mathias

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



mysql won't start anymore ?!?

2005-07-02 Thread JanBro

Hi list,

I can't get mysql running again and I don't know why. My wag would
be a corrupt mysql.exe? I had it running for almost a year now and besides
the fact that my ibdata1 rose to a size of more than 2.5 G (with actual 
data of

less than 100 M) I didn't encounter problems. but this morning I started my
lap without mysql.

When I try to restart the service in winxp (prof)
\mysqld-opt --defaults-file=C:\WINDOWS\my.ini MySql

I get the message: 2 System can't find the specified file

I'm using a mysql 4.1. Is there a way to look the right version up somehere?
If I try to connect via command line I'am asked for my password but I'm
refused - can't connect to server on localhost

I haven't done any changes on setting of the db lately, so I'm a bit 
clueless on

where this is coming from

How can I get my system back on track? Where do I have to look to provide
more info on my system?

thx
Jan

to complete it here is my ini:
[mysqld]
basedir=C:/datenbank/mysql/db
bind-address=127.0.0.1
datadir=C:/datenbank/mysql/db/data
#language=C:/datenbank/mysql/db/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
#Show user and password in SHOW SLAVE HOSTS
show-slave-auth-info
set-variable=max_allowed_packet=2M


#Speeds up server shutdown process.
#skip-innodb_fast_shutdown


#Enable/disable LOAD DATA LOCAL INFILE
#local-infile


#INSERT/DELETE/UPDATE has lower priority than selects.
#low-priority-updates


#Enable this option only if you would like to use InnoDB tables.
#skip-innodb


[WinMySQLadmin]
Server=C:/datenbank/mysql/db/bin/mysqld-nt.exe
user=root
password=


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



General-list comment

2005-07-02 Thread Danny Stolle

Is there a problem with the mysql-general list? I haven't had any messages?

Danny Stolle
Netherlands

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



offer a solution ?

2005-07-02 Thread nephish

Hey there,
i have been messing around with MySQL for a little bit now. I have  a 
question about how i might could do something.


i am writing a database to track what a bunch of electric monitors are 
doing.
the status of the monitor changes almost daily. i need access to each 
monitor, when it changed, and i also need to track its history. Easy 
enough. but if i update a row in a table, i loose the old info. So i 
kinda cannot create a table referenced by a key of monitor number...  i 
think that the easiest way, would be to create a seperate table for each 
monitor... but there are almost a thousand monitors... will that become 
a nightmare ? can MySQL handle that kind of thing? a thousand tables in 
one database ? i have to be able to access each change in its history.


how should i set this up?

thanks for any suggestions.

shawn

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: offer a solution ?

2005-07-02 Thread Frank Bax

At 01:49 PM 7/2/05, nephish wrote:


i am writing a database to track what a bunch of electric monitors are doing.
the status of the monitor changes almost daily. i need access to each 
monitor, when it changed, and i also need to track its history. Easy 
enough. but if i update a row in a table, i loose the old info. So i kinda 
cannot create a table referenced by a key of monitor number...  i think 
that the easiest way, would be to create a seperate table for each monitor.



Add a column for date changed instead.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: offer a solution ?

2005-07-02 Thread Jim McAtee
No, you don't want a table for each monitor.  One table for the data will 
be _much_ easier to work with.  If you want a history then you need to 
insert a new record for each datapoint that you get, with, as Frank 
suggested, a date/time column.  How large your table will get will depend 
on the number of monitors and how often you retrieve data.  Depending on 
how much history you need to keep, you can periodically trim the table by 
deleting all data older than N days (or hours, months, years).



- Original Message - 
From: nephish [EMAIL PROTECTED]

To: mysql mysql@lists.mysql.com
Sent: Saturday, July 02, 2005 11:49 AM
Subject: offer a solution ?



Hey there,
i have been messing around with MySQL for a little bit now. I have  a 
question about how i might could do something.


i am writing a database to track what a bunch of electric monitors are 
doing.
the status of the monitor changes almost daily. i need access to each 
monitor, when it changed, and i also need to track its history. Easy 
enough. but if i update a row in a table, i loose the old info. So i 
kinda cannot create a table referenced by a key of monitor number...  i 
think that the easiest way, would be to create a seperate table for each 
monitor... but there are almost a thousand monitors... will that become 
a nightmare ? can MySQL handle that kind of thing? a thousand tables in 
one database ? i have to be able to access each change in its history.


how should i set this up?

thanks for any suggestions.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: offer a solution ?

2005-07-02 Thread Frank Bax
Actually, there should actually be two tables.  One for columns that are 
static information about the monitor; the other with information that changes.



should be in a separate table.  OnlAt 12:30 PM 7/2/05, Jim McAtee wrote:

No, you don't want a table for each monitor.  One table for the data will 
be _much_ easier to work with.  If you want a history then you need to 
insert a new record for each datapoint that you get, with, as Frank 
suggested, a date/time column.  How large your table will get will depend 
on the number of monitors and how often you retrieve data.  Depending on 
how much history you need to keep, you can periodically trim the table by 
deleting all data older than N days (or hours, months, years).



- Original Message - From: nephish [EMAIL PROTECTED]
To: mysql mysql@lists.mysql.com
Sent: Saturday, July 02, 2005 11:49 AM
Subject: offer a solution ?



Hey there,
i have been messing around with MySQL for a little bit now. I have  a 
question about how i might could do something.


i am writing a database to track what a bunch of electric monitors are doing.
the status of the monitor changes almost daily. i need access to each 
monitor, when it changed, and i also need to track its history. Easy 
enough. but if i update a row in a table, i loose the old info. So i 
kinda cannot create a table referenced by a key of monitor number...  i 
think that the easiest way, would be to create a seperate table for each 
monitor... but there are almost a thousand monitors... will that become a 
nightmare ? can MySQL handle that kind of thing? a thousand tables in one 
database ? i have to be able to access each change in its history.


how should i set this up?

thanks for any suggestions.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql won't start anymore ?!?

2005-07-02 Thread Gleb Paharenko
Hello.



It is not enough information to make a conclusion. Follow

recommendations from:

  http://dev.mysql.com/doc/mysql/en/windows-troubleshooting.html







JanBro [EMAIL PROTECTED] wrote:

 Hi list,

 

 I can't get mysql running again and I don't know why. My wag would

 be a corrupt mysql.exe? I had it running for almost a year now and besides

 the fact that my ibdata1 rose to a size of more than 2.5 G (with actual 

 data of

 less than 100 M) I didn't encounter problems. but this morning I started my

 lap without mysql.

 

 When I try to restart the service in winxp (prof)

 \mysqld-opt --defaults-file=C:\WINDOWS\my.ini MySql

 

 I get the message: 2 System can't find the specified file

 

 I'm using a mysql 4.1. Is there a way to look the right version up somehere?

 If I try to connect via command line I'am asked for my password but I'm

 refused - can't connect to server on localhost

 

 I haven't done any changes on setting of the db lately, so I'm a bit 

 clueless on

 where this is coming from

 

 How can I get my system back on track? Where do I have to look to provide

 more info on my system?

 

 thx

 Jan

 

 to complete it here is my ini:

 [mysqld]

 basedir=C:/datenbank/mysql/db

 bind-address=127.0.0.1

 datadir=C:/datenbank/mysql/db/data

 #language=C:/datenbank/mysql/db/share/your language directory

 #slow query log#=

 #tmpdir#=

 #port=3306

 #set-variable=key_buffer=16M

 #Show user and password in SHOW SLAVE HOSTS

 show-slave-auth-info

 set-variable=max_allowed_packet=2M

 

 

 #Speeds up server shutdown process.

 #skip-innodb_fast_shutdown

 

 

 #Enable/disable LOAD DATA LOCAL INFILE

 #local-infile

 

 

 #INSERT/DELETE/UPDATE has lower priority than selects.

 #low-priority-updates

 

 

 #Enable this option only if you would like to use InnoDB tables.

 #skip-innodb

 

 

 [WinMySQLadmin]

 Server=C:/datenbank/mysql/db/bin/mysqld-nt.exe

 user=root

 password=

 

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Duplicate entry error

2005-07-02 Thread Gleb Paharenko
Hello.



 1.How to send MySQL versions on master and slave.



Send an output of the following statement executed both on master

and slave:

  select version();





 2.Where I have to include output of 'SHOW SLAVE STATUS'.



Execute SHOW SLAVE STAUTS on your slave (run START SLAVE before)

and include the output in your answer. In such way you could find

the  position of the last event executed by the SQL thread from the

master's binary log. See:

  http://dev.mysql.com/doc/mysql/en/show-slave-status.html



 3.How to Fix the problem if it does occurs.



First check with mysqlbinlog utility if master and relay binary logs

contain the same query.



 4.How to restart the slave SQL thread with SLAVE START.



You should find where the error occurred, fix it, possibly by

executing SQL query on the slave. Than 'CHANGE MASTER' to corresponding

position in the master binary log and start slave. If your's data

size is small, sometimes it is better to setup replication again.

However, finding the cause of the problem is preferred way.







 

 Thanks again for your help and cooperation.

 

 Anurag

 

 

 -Original Message-

 From: Gleb Paharenko [mailto:[EMAIL PROTECTED]

 Sent: Thursday, June 30, 2005 3:20 PM

 To: mysql@lists.mysql.com

 Subject: Re: Duplicate entry error

 

 

 Hello.

 

 Please examine your master's binary and slave's relay logs with

 mysqlbinlog utility to find if sent and received SQL statements are

 different. Sent your MySQL versions on master and slave. Include

 complete output of 'SHOW SLAVE STATUS'. If your version is rather old,

 check if the problem remains after upgrade.

 

 

 

 [EMAIL PROTECTED] wrote:

=0D

 Hi all,

 I am getting duplicate entry error while inserting data in the table.=0D

 My table name is TEMP and it contains only one field which is primary=0D

 key=3D ,nt null as well as auto increment .

=0D

 050628 16:05:00  Slave: Error 'Duplicate entry '77' for key 1' on=0D

 query 'INSERT INTO TEMP VALUES ()'. Default database: 'our database=0D

 name is=3D

 here', Error_code: 1062

 050628 16:05:00  Error running query, slave SQL thread aborted.=3D0D Fix

 

 the problem, and restart the slave SQL thread with SLAVE START. We=3D=0D

 stopped at log 'log-bin.018' position 37918

=0D

 I have a master slave setup.So slave database has entries upto 77 only

 

 but=3D master database has entries upto 114. If I again start inesrting=0D

 entries then entries in slave database will=3D start from 115 which is=0D

 really danagerous for me.

=0D

 I couldn't understand the statement=3D0D

=0D

 Fix the problem, and restart the slave SQL thread with SLAVE START.

=0D

 Can anybody help me in solving this issue ?

=0D

 Thanks and Regards,

 Anurag

=0D

=0D

 -Original Message-

 From: Johan H=3DF6=3DF6k [mailto:[EMAIL PROTECTED]

 Sent: Thursday, June 30, 2005 2:01 PM

 To: [EMAIL PROTECTED]

 Cc: Siegfried Heintze; mysql@lists.mysql.com

 Subject: Re: Wanted: Help with 'ON DUPLICATE KEY' syntax

=0D

=0D

 Hi Jocelyn,

 you're right of course. I didn't read the original post closely enough

 

 (it's early in the morning here...). I missed that SELECT wasn't used.

=0D

 Regards,

/Johan

=0D

 [EMAIL PROTECTED] wrote:

 Hi Johan,

=3D0D

 I don't think it's its problem, since MySQL returns a You have an=3D0D

 

error in your SQL syntax. error, and not those specified in this=0D

bug=3D0D  report. This means the SQL parser failed to understand its=0D

query. =3D0D  Regards,

   Jocelyn

=3D0D

=3D0D

Hi Siegfried,

I think you've run into bug #8732:

...

Description:

if you do a INSERT INTO table (col_list) SELECT ... ON DUPLICATE=0D

KEY=3D0D UPDATE and refer to the same column in the col_list and in the

 

UPDATE=3D0D clause, it will bail out, doesn't seem like it should,=0D

since not listing the column in the INSERT

list will make it work.

...



I've run into it myself on 4.1.12.



/Johan



Siegfried Heintze wrote:



Thanks for deciphering that terrible message, Shawn. I=0D

accidentally=3D0D must have hit the paste key too many times.



Anyway, here is my new insert statement:





INSERT INTO jobtitlecount (fkJobPosting, dtSnapShot, cJobTitle)=3D0D=0D

VALUES

(211584,'2005-06-26',2) ON DUPLICATE KEY UPDATE cJobTitle=3D3D2





DBD::mysql::st execute failed: You have an error in your SQL=0D

syntax.=3D0D Check the manual that corresponds to your MySQL server=0D

version for=3D0D the right syntax to use near 'ON DUPLICATE KEY UPDATE

 

cJobTitle=3D3D2' at=3D

 =3D0D

line 1 at ./crawl-hot-jobs.pl line 675.







I'm looking at the documentation on=3D0D=0D

http://dev.mysql.com/doc/mysql/en/insert.html and I don't see what=0D

I=3D0D am doing wrong.



Thanks,

Siegfried









--

MySQL General Mailing List

For list archives: http://lists.mysql.com/mysql

To unsubscribe:http://lists.mysql.com/mysql?unsub=3D

 [EMAIL PROTECTED]

=3D0D

=3D0D

=3D0D

=3D0D

=0D

=0D

=0D

=0D

 Confidentiality Notice=3D0D

fulltext searching using special chars

2005-07-02 Thread Octavian Rasnita
Hi,

I am trying to search for a word that contains special chars like ş
or ţ, but I find only the words  and  like when the special
chars are not a part of the word.

I found that if I search for ş (in boolean mode), I am able to
find the records that contain the full word, but I would like to be able to
do this without needing to use quotes.

If it is possible, pleas tell me how.

Thank you.

Teddy



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: offer a solution ?

2005-07-02 Thread Stephen Cook
depending on what you use this information for, you might want to keep 
two tables, one with the current information, and one of the history. it 
would keep the current one relatively small, but allow for looking up 
historical data if necessary.



nephish wrote:

Hey there,
i have been messing around with MySQL for a little bit now. I have  a 
question about how i might could do something.


i am writing a database to track what a bunch of electric monitors are 
doing.
the status of the monitor changes almost daily. i need access to each 
monitor, when it changed, and i also need to track its history. Easy 
enough. but if i update a row in a table, i loose the old info. So i 
kinda cannot create a table referenced by a key of monitor number...  i 
think that the easiest way, would be to create a seperate table for each 
monitor... but there are almost a thousand monitors... will that become 
a nightmare ? can MySQL handle that kind of thing? a thousand tables in 
one database ? i have to be able to access each change in its history.


how should i set this up?

thanks for any suggestions.

shawn



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Multi-Table Insert Strategy

2005-07-02 Thread Don Parris
O.k., this question is more about the best way to run a multi-table insert
on a MySQL DB (4.0.18), given a console based interface (Python 2.3.x under
SUSE Linux 9.2). My guess is that this would be a bit easier with a GUI,
where I would have widgets to assign to various functions.  However, I am
currently building a console app.  The GUI will come later.

When I add a person to the DB, the main table impacted is called 'person'. 
However, a few other tables are affected as well - entity, address,
affiliation, and aux_mbr.  For example, the person table uses the keys from
the others:

person.affil_id = affil.affil_id, person.ent_id = entity.ent_id, etc.

Somehow, the program will need to get the foreign keys from the other
tables, and insert that into the person table.  Technically, the program
won't be very likely to know what the current primary_key is for each table.

The 2 options I see so far are: 
(1) run insert queries on each table, ignoring the foreign key fields, and
then running an update query on person to add the foreign keys from the
respective tables:
  insert into person values (PK, 'blah', 'blab')
  insert into entity values (PK, 'bleep', 'blip')
  update person set ent_id=1 where person_id=1 #'1' should be a variable

(2) run a query when the input form is launched to determine the current
max value of the foreign keys, then use that info to automatically add the
foreign keys into the person table:
  select entity_id MAX from entity
  ### run Python input form, ent_id is passed to the appropriate input
  statement ###  
  insert into person tuple  #(PK, ent_id, 'blah', 'blab')

The commands here aren't intended to be precise, but rather to help paint
the picture.

A link to a previous thread or documentation on this would be fine.  I don't
mind doing the reading - but my Google search seems to turn up more info
about multi-table deletes than inserts.  I realize that MySQL doesn't
support a single multi-table insert function, but are the two approaches I
see good, bad, common??

Thanks,
Don
-- 
evangelinuxGNU Evangelist
http://matheteuo.org/   http://chaddb.sourceforge.net/
Free software is like God's love - you can share it with anyone anytime
anywhere.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]