Re: Need help on WHERE ... LIKE Query

2003-10-30 Thread Kelley Lingerfelt
You can use RLIKE which is regular expressions then you should be able to execute SELECT * FROM sometable WHERE surname RLIKE '^[A-C]' ORDER BY surname; Kelley Scott Brown wrote: Hi, List, I looked here: http://www.mysql.com/doc/en/String_comparison_functions.html But I am not seeing

Re: Access my mysql db remotely...

2003-10-22 Thread Kelley Lingerfelt
Or just use an ssh tunnel to access it and then the firewall stays intact, and with the tunnel, it will be a local user, and it can come from any address, and all the database is concerned with is localhost access. Kelley Antony Dovgal wrote: On Wed, 22 Oct 2003 14:00:13 +0800 Hiu Yen Onn

Re: command line operation problems

2003-10-22 Thread Kelley Lingerfelt
Well, according to your message, you might want to make sure you are typing mysql and not mysqld(which is the server daemon) According to the docs when I go to the cmd window, I should type in mysql -username and then get prompted for a password. But I get this: look at what you typed,

Re: libmysqlclient.so

2003-10-21 Thread Kelley Lingerfelt
the mysql-devel rpm installs it. Kelley Matt Babineau wrote: Any ideas what packages install this library? I used the RPM to try and install MySQL-client on my redhat machine, but the libmysqlclient did not show up in /usr/lib - so I am wondering which RPM I need to get this file?

Re: Update Syntax

2003-10-21 Thread Kelley Lingerfelt
Can you use REPLACE? Kelley Randy Chrismon wrote: Please tell me it ain't so... I am writing a Lotus Nots agent to feed data directly into a MySQL table. The agent needs to either insert a new record or update an existing record depending on whether a document in Nots is new or updated.

Re: Why is there no REGEXP()?

2003-10-19 Thread Kelley Lingerfelt
I'm not sure what you're using to query with, but with the REGEXP expression you can OR(|) regular expression out the wazoo, so the capablility is built in MySQL. and I would consider it to be a pretty straightforward solution, you can do something like WHERE lookup RLIKE

Re: How to speed up query?

2003-10-16 Thread Kelley Lingerfelt
I think, if I understand this right, that the problem is the int(1) which limits the index to only the first digit, try to change that to int(11) or something like that, and see if that cures it. Kelley Ganbold wrote: Hi, I'm having some trouble running one query. I'm using FreeBSD 4.8 with

Re: moving a column to new table

2003-10-08 Thread Kelley Lingerfelt
My first thought would be to create an empty table call it new_table set it up like you want. then INSERT INTO new_table SELECT n.*,a.data FROM normal n LEFT JOIN another a ON o.id=a.id ORDER BY (n.id) and then verify it got there, and drop the other tables and rename the new_table to normal

Re: Good SQL Cookbook

2003-10-05 Thread Kelley Lingerfelt
Check out safari.oreilly.com, they have a two week trial right now, and they have a sh*tload of books online, including 'MySQL Cookbook' by Paul Dubois, and they also have 'MySQL' and 'MySQL and Perl for the Web' by Paul also, I would say they are probably the best MySQL books I've found, I

Re: Am I on a wrong list?

2003-09-30 Thread Kelley Lingerfelt
6.4.9 LOAD DATA INFILE Syntax LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] INTO TABLE tbl_name [FIELDS [TERMINATED BY '\t'] [[OPTIONALLY] ENCLOSED BY ''] [ESCAPED BY '\\' ] ] [LINES [STARTING BY ''] [TERMINATED BY '\n'] ] [IGNORE number LINES]

Re: mysqldump error (mysql 4.0.14)

2003-09-29 Thread Kelley Lingerfelt
Try putting the name inside of backticks; From the Manual: 6.1.2 Database, Table, Index, Column, and Alias Names --- Note that if the identifier is a restricted word or contains special characters you must always quote it with a

Re: complex, to me, insert question

2003-09-27 Thread Kelley Lingerfelt
You need to substitute t1_id, t3_id ... etc, for the appropriate field names in the other_table you are wanting to insert the values into. The missing fields will be filled in with their default values: INSERT INTO other_table (t1_id, t3_id, t2_id, g_description, g_price, g_qty, g_comments)

Problem compiling a small C program on Redhat-7.3

2003-09-25 Thread Kelley Lingerfelt
Does anybody have any idea why this program won't compile, it seems to be straightforward, but it I can't get it to compile on Redhat-7.3. It starts screaming about mysql.h immediately, I use this link to compile with, on my machine at the house, it compiles just fine and runs just fine, but I

Re: Problem compiling a small C program on Redhat-7.3

2003-09-25 Thread Kelley Lingerfelt
I found the answer in the archives: http://marc.theaimsgroup.com/?l=mysqlm=104770109826977w=2 /* client1.c - connect to and disconnect from MySQL server */ #include my_global.h #include my_sys.h /* - Added this and it all works fine now */ #include mysql.h thanks Paul :) KL Kelley

Re: speeding up a search

2003-09-23 Thread Kelley Lingerfelt
Make sure stamps.item_id and links.item_id are indexed, I had a similar problem, and when I indexed the columns, it went down to less than a half second. KL John Almberg wrote: I am trying to find records (from the 'stamps' table) that are NOT related to records in the 'links' table. To do

Re: LOAD DATA INFILE failing on OS X Server

2003-09-21 Thread Kelley Lingerfelt
The only thing I would suggest is to look in the mysqllog and look at the command that is specifically being issued, and then try it from the mysql command line interface, and see if it works there, it should give you a good enough reason if it doesn't, and if it does, it more than likely is some

Re: using OR in select statement with distinct results

2003-09-18 Thread Kelley Lingerfelt
Won't putting the first OR in parenthesis, fix it up? SELECT t1.title, t2.auth_name FROM t1, t2, WHERE (cat_id = 1 OR cat_id = 2) AND t1.auth_id = t2.auth_id KL Sam Folk-Williams wrote: Hi, I keep having this fundamental problem. It seems like this should be easy enough, but whenever I

Re: Joining tables from two different databases

2003-09-15 Thread Kelley Lingerfelt
I do it everyday, they are on the same machine and installation, but most of my queries span 2 to 4 databases. I can't get it it work on ODBC queries though, but PHP does it fine and so does the mysql command line. But I would be interested to know if there is any problems or reason not to do

Re: Stop a User warning message

2003-09-15 Thread Kelley Lingerfelt
Yep, you're right Paul, it is a bad query, one thing I've been burnt on a lot in the past, is using the variables inside those double quoted lines. I've started expanding everything, mostly objects and arrays won't get interpreted correctly, try building the query in a string, and then printing

Re: How to enable General Query_log?

2003-09-11 Thread Kelley Lingerfelt
I haven't used 9.0, I'm using 7.3, but I suspect it should be very similar, as root, edit the /etc/my.cnf file and add a couple of lines to the top section: it should look similar to this [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log=/var/log/mysql/mysqllog

Re: How to enable General Query_log?

2003-09-11 Thread Kelley Lingerfelt
, the columns Time, Id Command and Argument are in blank. Is there something additional variables that we have to configure ? Thank you for your support, EDWIN LIMACHI N. DATACOM - Instalaciones TSE - INFONET BOLIVIA Phone. 591-2-2123978 Movil: 591-715-29967 Fax: 591-2-2123975 Kelley

Re: web hosting/PHP MyAdmin

2003-09-04 Thread Kelley Lingerfelt
I like it also, but of all things, I have trouble with the display on Internet Explorer sometimes, strange only because everybody seems to write everything to be IE compatible nowadays, and it hangs, so I use Mozilla on it and have never had a problem. It makes some nice printouts of the table

Re: How much user LOAD can Mysql bear???

2003-09-03 Thread Kelley Lingerfelt
One thing about the pooling, persistent connections is that if you create temporary tables you need to drop them before you leave, or they just might be hanging around and if you have routines that create them, they could/will be there, because the session is still active. At least I think

Re: Select from one table where ID not in another table

2003-09-02 Thread Kelley Lingerfelt
select t1.* from table1 t1 LEFT JOIN table2 t2 on t1.id=t2.id WHERE t2.id IS NULL you can print out table2 values if you want, but they will all be NULL.. provided that table2.id and table1.id are the matches you are trying to find. Kelley Martin Moss wrote: All, Am wondering if it's

Re: Select from one table where ID not in another table

2003-09-02 Thread Kelley Lingerfelt
SELECT tr.* FROM Table1 tr LEFT JOIN Table2 recTran ON tr.ReconciliationID=recTran.ReconciliationID WHERE (tr.ReconciliationID = '8' AND tr.TransactionID recTran.TransactionID) || recTran.ReconciledTransactionID IS NULL; Should work, I'm always not sure about the joins and which table should go

LEFT JOIN GROUP BY HAVING problem

2003-08-30 Thread Kelley Lingerfelt
Ok, I've got a problem, I've got an inventory of books they can be stored in different locations in the warehouse and I need to generate a booklist, and I want to include the title and an author, I have a table with the authors in it, and there may be anywhere from 1 to 10 authors for a particular