Action after new/update record

2005-01-26 Thread Patrick Marquetecken
Hi, I'm quite new with mySQL, i have bought the book Mastering MySQL4 but i don'f find a solution for my problem there. There are no triggers in version 4 if 'im correct, but i want to export a table (small one) every time there is a new record or a record modified. Whats the way to do this,

error in your SQL syntax

2005-01-26 Thread Daniel Sousa
I have a problem. 1064 - You have an error in your SQL syntax near '(((specials INNER JOIN (products_to_categories INNER JOIN categories ON products' at line 2 SELECT DISTINCT specials.specials_id, products_to_categories.products_id, categories.parent_id, products_description.products_name,

Access denied for user - I cant work this out

2005-01-26 Thread Christian Biggins
Hi All, I am consistently getting; Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) I am connecting through php with the same script I use all the time, I have checked it and dbl checked it for problems. I can connect to mysql in a prompt and I have added new users with all

RE: Action after new/update record

2005-01-26 Thread Jay Blanchard
[snip] I'm quite new with mySQL, i have bought the book Mastering MySQL4 but i don'f find a solution for my problem there. There are no triggers in version 4 if 'im correct, but i want to export a table (small one) every time there is a new record or a record modified. Whats the way to do this,

Re: error in your SQL syntax

2005-01-26 Thread Rhino
You have an awful lot of brackets in the query, many of which don't appear to be needed. For example, I don't see why you have brackets in this phrase: AND ((languages.languages_id)=1)) Perhaps removing the unnecessary ones will help the query work better and more consistently on each machine.

drop table is written to bin-log, load table is NOT - why????

2005-01-26 Thread Lutz Maibach
Hello, I'm wondering why on a replication client (MySQL 4.0.23) a drop table XYZ is written to the mysql binlog while the following load table XYZ from master is not. This missing binlog-entry in the first repl. client causes a second replication client, which is replicating the first client,

RE: Access denied for user - I cant work this out

2005-01-26 Thread Peter Lovatt
hi you are not passing a password to mysql - check your code to see if this is correct. Peter -Original Message- From: Christian Biggins [mailto:[EMAIL PROTECTED] Sent: 26 January 2005 12:27 To: mysql@lists.mysql.com Subject: Access denied for user - I cant work this out Hi All,

RE: Access denied for user - I cant work this out

2005-01-26 Thread Christian Biggins
Hi Peter, There is a password being suppled - see code (btw, its local testing only, hence the root user) //Database Settings $db_host = 'localhost'; //database hostname $db_name = 'powerpla_powerplay'; //database name $db_user = 'root'; //database USER name $db_pass = 'rootpass'; //

RE: Access denied for user - I cant work this out

2005-01-26 Thread Tom Crimmins
The problem is with your php. Just as a test, print $db_host,$db_user,$db_pass in your function before you try the connect. My guess is that they will be blank. The reason for this is that you assign them outside of the function. This means you either need to pass them to the function or

Out of tablespace when using innodb_file_per_table

2005-01-26 Thread Grumm, Carsten
Hello, I'm using InnoDB with the innodb_file_per_table option on. But now my .MYD-file has reached the maximum filesize of my filesystem and i have to add a new tablespace. Can someone tell me how? Thanks in advance for your help Carsten -- MySQL General Mailing List For list archives:

RE: Problems with select distinct

2005-01-26 Thread Gustafson, Tim
Michael, Thanks for your suggestion. Here's the query that seems to have fixed the problem, without a DISTINCT clause: select Documents.ID, Name, max(DownloadLog.AddedOn) as DownloadedOn from Documents, DocumentFiles, DownloadLog where Documents.ID =

RE: Access denied for user - I cant work this out

2005-01-26 Thread Peter Lovatt
Hi If this is verbatim code the connection string is inside the function and the connection parameters are outside, so they will not be available to the mysql_connect() Try function db_connect() { //Database Settings $db_host = 'localhost'; //database hostname $db_name =

A problem of structure

2005-01-26 Thread Pupeno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello MySQLers, I'm trying to define a structure for my database and I'm experience some problems, any comments would be appretiated. This is for a (web) application to handle information about music, lyrics and resources for playing songs. So, the

Re: error in your SQL syntax

2005-01-26 Thread SGreen
Here is your original query, reformatted merely so that we humans can read it better: SELECT DISTINCT specials.specials_id , products_to_categories.products_id , categories.parent_id , products_description.products_name , products.products_price ,

Re: A problem of structure

2005-01-26 Thread Ian Sales (DBA)
Pupeno wrote: Now that I'm thinking about a fourth solution: Have two totally separate tables for groups and persons (this is what I really like) and then, one table to relate songs to persons, and another table to relate songs to groups. The problem with that is that, sometimes, I need to get

RE: drop table is written to bin-log, load table is NOT - why????

2005-01-26 Thread Artem Koltsov
Hello Lutz, As far as I know, binlog records only DML and DDL statements, and LOAD TABLE FROM MASTER is not the one. For selective replication I would check startup options --replicate-do-* and --replicate-wild-*. See http://dev.mysql.com/doc/mysql/en/replication-options.html for details. Also

Re: A problem of structure

2005-01-26 Thread SGreen
Pupeno [EMAIL PROTECTED] wrote on 01/26/2005 07:00:34 AM: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello MySQLers, I'm trying to define a structure for my database and I'm experience some problems, any comments would be appretiated. This is for a (web) application to handle

InnoDB, record locking question

2005-01-26 Thread Mojtaba Faridzad
Hi, I am trying to learn more about InnoDB to convert MyISAM to InnoDB. according to MySQL document, I can lock a record like this: SELECT * FROM mytable WHERE id = '100' LOCK IN SHARE MODE; I run this query and showed a message to stop the screen (waiting) and on the other computer I run the

Re: A problem of structure

2005-01-26 Thread Pupeno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Je Merkredo Januaro 26 2005 15:34, Ian Sales (DBA) skribis: SONG-TO-PERSON-OR-GROUP LINK TABLE * song_id * person_id * group_id * role (performer, lyricist, etc.) What I don't like about that, is that half the person_id fields would be empty

Re: A problem of structure

2005-01-26 Thread Ian Sales (DBA)
Pupeno wrote: What I don't like about that, is that half the person_id fields would be empty and half the group_id fields would be empty. I was thinking about: SONG-TO-PERSON-OR-GROUP LINK TABLE * song_id * musician_id * type ('person', 'group') * role (performer, lyricist, etc.) But this is the

Re: error in your SQL syntax

2005-01-26 Thread Daniel Sousa
Thanks, works fines. I use access because i donĀ“t know a GUI tool that make SQL querys more easy. Thanks all again, Daniel Sousa - Original Message - From: [EMAIL PROTECTED] To: Daniel Sousa Cc: mysql@lists.mysql.com Sent: Wednesday, 26 January, 2005 14:57 Subject: Re:

RE: error in your SQL syntax

2005-01-26 Thread Artem Koltsov
Try Query Browser ( http://dev.mysql.com/downloads/query-browser ) for building queries for MySQL. Regards, Artem -Original Message- From: Daniel Sousa [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 11:18 AM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject:

Re: A problem of structure

2005-01-26 Thread Pupeno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Shawn Green, Je Merkredo Januaro 26 2005 15:42, [EMAIL PROTECTED] skribis: If it were me, I would have separate tables for groups, songs, performances, recordings, and artists. Well, the thing is that I was just doing a site for holding

Re: A problem of structure

2005-01-26 Thread Jason Martin
On Wed, Jan 26, 2005 at 01:56:05PM +, Pupeno wrote: Takes more room because of the extra field ? Can you tell me more about 'the normalized approach' ? http://en.wikipedia.org/wiki/Database_normalization -Jason Martin -- If you cannot convince them, confuse them. This message is PGP/MIME

Checking max_allowed_packet from PHP during runtime?

2005-01-26 Thread Martin Olsson
Hi MySQL gurus, I'm using the LAMP stack and I'm currently creating a script that allows file uploading through a HTML form. The script itself is to be redistributed so I do not really know anything about the systems it runs on, except maybe that it's LAMP. I keep getting errors because I

mysqld restarts with no apparent reason

2005-01-26 Thread Alfredo Reynoso
Hi, Im running MySQL 4.0.23 (build from source with skunkware gcc 2.95.2pl1 and a precompiled FSU-pthreads 3.5c) under SCO Openserver 5.0.4. It runs great by itself, the problem comes when I make a program using the C API, it restart mysqld the second (sometimes third) time I run my program,

Re: Checking max_allowed_packet from PHP during runtime?

2005-01-26 Thread Keith Ivey
Martin Olsson wrote: I tried this before: ?php connectToDatabase(); $result = mysql_query(SHOW VARIABLES); $row = mysql_fetch_assoc($result); echo VALUE= . $row['max_allowed_packet']; ? But this does not work, as SHOW VARIABLES seems to be console only; not a valid query. Try looking at the

Re: A problem of structure

2005-01-26 Thread SGreen
Pupeno [EMAIL PROTECTED] wrote on 01/26/2005 08:56:05 AM: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Shawn Green, Je Merkredo Januaro 26 2005 15:42, [EMAIL PROTECTED] skribis: If it were me, I would have separate tables for groups, songs, performances, recordings, and

Re: A problem of structure

2005-01-26 Thread Pupeno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There where two cases where I have roles: How an artist participated in a song (creating the lyrics, creating the musici, etc, etc) and how an artist participates in a group. Do you think that enums are good for this kind of things ? or another table

Re: A problem of structure

2005-01-26 Thread Pupeno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Je Merkredo Januaro 26 2005 18:56, [EMAIL PROTECTED] skribis: For instance, when Eric Clapton did his unplugged version of Layla, he was the same ARTIST as recorded the original studio version but he was part of two different groups. The first time

Re: A problem of structure

2005-01-26 Thread SGreen
Pupeno [EMAIL PROTECTED] wrote on 01/26/2005 11:48:59 AM: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There where two cases where I have roles: How an artist participated in a song (creating the lyrics, creating the musici, etc, etc) and how an artist participates in a group. Do you

slow connections with 4.1.9

2005-01-26 Thread Keith Thompson
Since upgrading my Solaris9 server to MySQL 4.1.9 (previously 4.1.3), remote connections to it from my WinXP laptop have become very slow. Remote connections using the mysql command-line tool (4.1.7 client), MySQL Query Browser (1.1.5) or JDBC connections with Connector/J (3.0.16) used to all

Re: A problem of structure

2005-01-26 Thread SGreen
Pupeno [EMAIL PROTECTED] wrote on 01/26/2005 11:53:06 AM: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Je Merkredo Januaro 26 2005 18:56, [EMAIL PROTECTED] skribis: For instance, when Eric Clapton did his unplugged version of Layla, he was the same ARTIST as recorded the original

oid or rowid equivalent

2005-01-26 Thread Nupur Jain
Hi, I was wondering if mysql supports rowid like oracle or oid like pgsql does for updates? If no, is there a work around to these? Thanks! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Serious bug (or my foolishness) with alter table and InnoDB

2005-01-26 Thread Heikki Tuuri
Karam, - Original Message - From: Karam Chand [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Tuesday, January 25, 2005 8:58 PM Subject: RE: Serious bug (or my foolishness) with alter table and InnoDB Hello, I just checked with the same version at home and it works. Dont

Re: Out of tablespace when using innodb_file_per_table

2005-01-26 Thread Heikki Tuuri
Carsten, - Original Message - From: Grumm, Carsten [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Wednesday, January 26, 2005 4:22 PM Subject: Out of tablespace when using innodb_file_per_table Hello, I'm using InnoDB with the innodb_file_per_table option on. But now my

RE: oid or rowid equivalent

2005-01-26 Thread Dathan Pattishall
Innodb has a oracle style rowid but it can't be accessed. You might want to use auto_increment a table option that updates with each inserted record. DVP Dathan Vance Pattishall http://www.friendster.com -Original Message- From: Nupur Jain [mailto:[EMAIL PROTECTED]

Re: A problem of structure

2005-01-26 Thread Jos Pablo Ezequiel Fernndez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 After the good comments I've got on this mailing list, I think I have the structure more or less complete. In some cases I follow the comments, in some others, I've improvised (hehehe). So, this is the (explained) structure, what do you think ?

Weird join needs

2005-01-26 Thread Pupeno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm in need of doing the following. I have a table, let's say, with a record like this: 1, 'A', 'B'. 2, 'C', 'D' And then I have another table with records like this: 1, 'E' 1, 'F'. Currently I have a query that is able to return (doing a left join):