'LIKE' for numbers

2005-12-18 Thread Andy Pieters
Hi all Is there any operator for mysql that behaves like "LIKE" but can act on numbers. Let's say I wanted to select all rows where column x has a value of ~ y How should I do this? With kind regards Andy -- Now listening to Trancelation - Intensensation on amaroK Geek code: www.vlaamse-k

How to index a table with many fields?

2005-12-01 Thread Andy Pieters
Hi list I have a data set that is composed of many fields (30+). The final app will allow the users to search records on each field. What is the best thing to index in this situation? Make an index for *all* fields? With kind regards Andy -- Now listening to Phase - Morning Light on amar

Re: making mysql-client for windows behave

2005-07-29 Thread Andy Pieters
Hi there Sorry about starting a new thread but I lost the original message Anyway Mr. Green suggested to change the settings on the shortcut, or on a copy of the shortcut, but that is just plain inpossible! I cannot change target or icon of the shortcut that was created by the MySql instal

making mysql-client for windows behave

2005-07-28 Thread Andy Pieters
Hi all I installed mysql client on a windows box and created a my.conf file with the following: [client] server=servername user=username When I type the full path of the executable, it reads the conf file, and takes appropriate action. However, when I use the shortcut that is created by the m

Re: Prevalidating queries? [SOLVED]

2005-06-14 Thread Andy Pieters
Hi Thanks that really does answer my question and it meets my requirements as well. Thank you With kind regards Andy -- Registered Linux User Number 379093 -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/>E$ d-(---)>+ s:(+)>: a--(-)>? C$(+++) UL>$ P-(+)>++ L+++>$ E---(-

Re: Prevalidating queries?

2005-06-14 Thread Andy Pieters
> I seriously encourage you to read up on > transactions and InnoDB and I strongly suggest you change your table > design (to use InnoDB). That way you have an actual "ROLLBACK" command at > your disposal. Otherwise you will be re-inventing the wheel by creating a > versioning-locking system for My

Prevalidating queries?

2005-06-13 Thread Andy Pieters
Hi all As part of an automated patch system, I am facing the following problem: * A script will update the program from version x to version y * The script contains file actions, and database (mysql) actions * The actions are executed in order * For each action, a backup copy is created (if neces

Re: insert...select only inserts first record [SOLVED]

2005-05-11 Thread Andy Pieters
Hi I got a reply offlist from Shawn Green telling me to check my indexes on table pending_cart. As it turned out, the primary index (id) did not have its auto_increment bit set. ALTER TABLE `pending_cart` CHANGE `id` `id` INT( 11 ) DEFAULT '0' NOT NULL

insert...select only inserts first record

2005-05-11 Thread Andy Pieters
Hi all I want to 'copy' the contents of the table 'cart', where userid=... to the table pending_cart. Here is some example data for the table 'cart' ++++-+ | id | userid | prodid | qty | ++++-+ | 25 |123 | 15 | 1 | | 23 |124 | 14

Re: Error Connecting To Server From Client Machine-Linux

2005-05-08 Thread Andy Pieters
Hi Mark You should know that users and passwords are specific to the host where they are being used. For instance, if your root password on the server is mypass, and use it to connect to the mysql server, then it will get accepted. Now if you use a mysql client on another machine to connect to

Multi condition/table select

2005-04-24 Thread Andy Pieters
Hi all I am trying to figure out how to do this in one query. Using MySQL 2.3.58 Tables (only relevant data shown) Categories: id=int 11 primary key title = varchar Products: id=int 11 primary key name=varchar Lnk: catid=int11 primary key lnk=int 11 (key

Re: MySQL not starting at boot-Fedora Core 3

2005-04-16 Thread Andy Pieters
Hi Try to see in the log files cat /var/log/mysqld or start the mysql server and then type tail /var/log/messages On Fedora, once you have properly installed mysql there is no need to reboot your system to test it. Just type /sbin/service mysql start other options you can use there: stop re

4==4something: equal vs identical

2005-04-16 Thread Andy Pieters
Hi everone I ran into some situation where MySql selects a row by using the following query: SELECT `id` FROM `shop_products` WHERE `id`="4aef" LIMIT 1; ++ | id | ++ | 4 | ++ Granted the field IS of type int but 4 is not identical to 4aef (it may be equal to the eyes of MySql) Is

Warning (reformulated)

2005-04-15 Thread Andy Pieters
Hi all Realizing maybe my first post wasn't clear enough... How can I determine the cause for a warning. The MySql version is 3.23.58 The query I used was: UPDATE `shop_products` SET `name`='TestProd' , `shopid`='20-302' , `sdesc`='This is a test product' ,    

Re: Computer reboots during long table join

2005-04-15 Thread Andy Pieters
On Friday 15 April 2005 17:52, mos wrote: > I found out what the problem was. The computer rebooted at 3AM. I > checked the event log and good old MS auto installed updates at 3AM every > day. I NEVER have this option turned on but somehow something turned it on. > Good old @#$!@ MS *hit h

Warning but show warning not available (mysql version 3.21)

2005-04-15 Thread Andy Pieters
Hi all I use a script to build a query and while testing this script by copy'ing it into the mysql console, it shows me a warning. However, the SHOW WARNINGS; is not available on versions < 4. mysql> describe shop_products; ++---+--+-+-+

Re: Egg vs chicken kind question [solved]

2005-04-14 Thread Andy Pieters
On Thursday 14 April 2005 20:52, [EMAIL PROTECTED] wrote: > > You have to disable those links (or just not present them as options) > until the user has filled in enough information to create a valid Product > record. > > Shawn Green > Database Administrator > Unimin Corporation - Spruce Pine Th

Egg vs chicken kind question

2005-04-14 Thread Andy Pieters
gs others, a link to "attach page", and "attach product". I thank you in advance for your time and answers. With kind regards Andy Pieters -- Registered Linux User Number 379093 -- ---BEGIN GEEK CODE BLOCK- Version: 3.12 GAT/O/CM d- s:+ a- C UL P+ L+++ E--- W+++

Re: Non-destructive Expanding & Retracting sets

2005-03-31 Thread Andy Pieters
On Thursday 31 March 2005 17:27, Jason Martin wrote: > From a Normal Form perspective, this is supposed to be > implented as > Page 1category 1 > Page 1category 2 > Page 2category 3 > Page 3category 2 > Page 3category 4 > > at which point adding / removing ca

Non-destructive Expanding & Retracting sets

2005-03-31 Thread Andy Pieters
Hi all Facing the following problem In a record there is a field category. Categories can be added/changed/removed If I would use a fieldtype of set if would have been destructive in case a category got removed. So I implemented by using a text type field and some extra validation routines.

Re: Mysql installation

2005-03-31 Thread Andy Pieters
nload page http://dev.mysql.com/downloads/ With kind regards Andy Pieters On Thursday 31 March 2005 14:55, Suryya Ghosh wrote: > Hi, > > We have server with the following hardware specification: > > Server: Dual Xeon 2.8 GHz > Primary HDD: 73 GB SCSI > RAM:

Re: adding an incremented count from page hits

2005-03-25 Thread Andy Pieters
On Wednesday 23 March 2005 20:00, Chip Wiegand wrote: > count=count+1; <--- This is the added bit ---> > ?> > --- > The count doesn't increment in the database. The table has a column called > 'count'. > Two things: variables start with a