User Preferences?

2008-02-28 Thread Waynn Lue
I'm looking for a good way to store user preferences. The most straightforward way is just to add a column to the Users table for each preference we're looking to store. Downside is that it requires an ALTER TABLE which gets prohibitively expensive as it gets larger, as it's fairly inflexible.

/tmp/mysql.sock dissapears

2008-02-28 Thread Ian
Hi, I am running mysql 5.0.45 on freebsd 4.11 and for some strange reason /tmp/mysql.sock keeps on disappearing and we are forced to kill -9 mysql and restart it causing db corruptions as there is no other way of telling it to stop once that file has gone. I have tried to find any reason why this

Re: joining and grouping

2008-02-28 Thread Olav Mørkrid
no that won't work, because even though the where excludes *my* vote for a particular candidate, it will include everybody else's vote for the same candidate. the objective is: if *i* voted for john, then john should not be in the final result set even though a million other people voted for

LIKE problem with characters 'å' (norwe gian) and 'a' (mysql bug?)

2008-02-28 Thread Magne Westlie
Dear List, I get incorrect result when searching for the norwegian character 'å' using LIKE. I get rows with 'a' in it, and visa versa if I search for 'a', I get results which has 'å' in it in addition to the ones with 'a'. Example: CREATE TABLE names ( name VARCHAR(255) )ENGINE=InnoDB

Re: User Preferences?

2008-02-28 Thread Dan Buettner
Waynn, I've used both schemes 1 and 2 as you describe, and in my experience 2 is the best way to go. It's easy to scale up as you add users and settings, and it's easy to make changes if the meaning of settings should change (i.e. you need to do a backend change to people's settings). #1 is

Re: weird select - version 2

2008-02-28 Thread Joerg Bruehe
Hi dante, all, [EMAIL PROTECTED] wrote: [[...]] In a nutshell, i need a query intelligent enough to make a query to table_Out, see if theres a match for 'id_tA', if there is one, retrieve field ref, otherwise go look in table_In and retrieve ref from there. Is it too complicated

Debugging mysql limits

2008-02-28 Thread Phil
I'm trying to figure out which limits I'm hitting on some inserts. I have 50 plus tables lets call them A_USER, B_USER, C_USER etc which I daily refresh with updated (and sometimes new) data. I insert the data into a temporary table using LOAD DATA INFILE. This works great and is very fast.

Re: /tmp/mysql.sock dissapears

2008-02-28 Thread Vidal Garza
how do you start up? you can start up from scrip. #!/bin/sh id=02 ip=192.168.0.42 sockfile=/tmp/mysql$id.sock user=mysql datdir=/var/db/mysql$id port=3306 /bin/sh /usr/local/bin/mysqld_safe --user=$user --datadir=$datdir --bind-address=$ip --port=$port --sock=$sockfile Ian escribió: Hi,

Question about reading info from another table.

2008-02-28 Thread Jason Pruim
Hi Everyone, I am attempting to write a PHP application that reads info from a MySQL database, and I'm wondering if I can set up a column in one table that gets it's info from a field in another table automatically? Ie: Table1: field1 field2 field3 Table2: field4 field5 field6 = field1

Re: /tmp/mysql.sock dissapears

2008-02-28 Thread Ian
Hi, We use the following sh script to start (its the default one when installed) cat /usr/local/etc/rc.d/mysql-server.sh #!/bin/sh # # $FreeBSD: ports/databases/mysql50-server/files/mysql-server.sh.in,v 1.32006/03/07 16:25:00 ale Exp $ # # PROVIDE: mysql # REQUIRE: LOGIN # KEYWORD: shutdown #

Re: Question about reading info from another table.

2008-02-28 Thread Rob Wultsch
On Thu, Feb 28, 2008 at 10:59 AM, Jason Pruim [EMAIL PROTECTED] wrote: Hi Everyone, I am attempting to write a PHP application that reads info from a MySQL database, and I'm wondering if I can set up a column in one table that gets it's info from a field in another table automatically?

Re: User Preferences?

2008-02-28 Thread Rob Wultsch
1. Blobs suck. I suggest a serialized array or JSON instead of a BLOB. 2. I have used this before and would love to know what the design pattern is called. This patterns works well, though I would not be surprised to see it called an anti-pattern. Adding fields make the normalized table grow very

Re: /tmp/mysql.sock dissapears

2008-02-28 Thread Vidal Garza
Its for test. put the log file on my.cnf and tellus what going on my.cnf ... log-error=/var/db/mysql/Server_Error.log Ian escribió: Hi, We use the following sh script to start (its the default one when installed) cat /usr/local/etc/rc.d/mysql-server.sh #!/bin/sh # # $FreeBSD:

Re: Question about reading info from another table.

2008-02-28 Thread Jason Pruim
On Feb 28, 2008, at 1:29 PM, Rob Wultsch wrote: On Thu, Feb 28, 2008 at 10:59 AM, Jason Pruim [EMAIL PROTECTED] wrote: Hi Everyone, I am attempting to write a PHP application that reads info from a MySQL database, and I'm wondering if I can set up a column in one table that gets it's info

Re: Odd Update Question.

2008-02-28 Thread Rob Wultsch
http://dev.mysql.com/doc/refman/5.0/en/update.html See multiple table syntax. I have had issues with the syntax (IMHO), and is not available on 3.23 (I am a poor soul that still has to deal 3.23). If you have all the data and you can not figure out the syntax you can alternatively use INSERT...

Re: Question about reading info from another table.

2008-02-28 Thread Rob Wultsch
What you are probably wanting is a join, but how does adminAll relate to current? Generally it is a good idea to have the column that relates the tables (read http://en.wikipedia.org/wiki/Foreign_key if you want to work at a much high level ) have the same column name if possible (IMHO). In the

Re: Question about reading info from another table.

2008-02-28 Thread Jason Pruim
On Feb 28, 2008, at 2:06 PM, Rob Wultsch wrote: What you are probably wanting is a join, but how does adminAll relate to current? adminAll will be for the administrators of my program to log into so instead of getting redirected automatically to a certain table (current.tableName in this

Re: Question about reading info from another table.

2008-02-28 Thread Rob Wultsch
I was referering to what you sent into the mysql user list. Descriptive table/columns are ideal in production. When asking for assistance it is ideal to remove extraneous detail. On Thu, Feb 28, 2008 at 12:18 PM, Jason Pruim [EMAIL PROTECTED] wrote: On Feb 28, 2008, at 2:06 PM, Rob Wultsch

Re: Question about reading info from another table.

2008-02-28 Thread Lyons, Jim
Jason Pruim wrote: I am attempting to write a PHP application that reads info from a MySQL database, and I'm wondering if I can set up a column in one table that gets it's info from a field in another table automatically? Ie: Table1: field1 field2 field3 Table2: field4 field5

Re: Question about reading info from another table.

2008-02-28 Thread Rob Wultsch
If he is not sure what a join or primary key is then I do not think a correct solution for anything he is working on would involve a trigger. In October '07 Baron Schwartz said the following: I'm not an expert on them, but as a side note: I personally don't use triggers in MySQL. I consider them

Re: /tmp/mysql.sock dissapears

2008-02-28 Thread Steve Bernacki
Does the system in question have some type of /tmp cleaner script that might be removing the socket file? Check /etc/crontab and root's crontab (crontab -l) Steve

Re: /tmp/mysql.sock dissapears

2008-02-28 Thread Ian
Hi, Okay, I have added that and will wait and see when it happens again if there is anything in that log. Just out of interest, does that log show anything different to the /var/db/mysql/hostnameofunit.err file ? Cheers Ian On Thu, Feb 28, 2008 at 8:44 PM, Vidal Garza [EMAIL PROTECTED] wrote:

Re: /tmp/mysql.sock dissapears

2008-02-28 Thread Ian
Hi, No, there is nothing in there cleaning /tmp. Mind you, further investigating there are still some temp files in there from last year - so the directory isnt getting wiped clean. Thanks :) On Fri, Feb 29, 2008 at 3:36 AM, Steve Bernacki [EMAIL PROTECTED] wrote: Does the system in question