Try something like this
SELECT price, min(abs(price-value)) as Mini from table group by price order
by Mini LIMIT 1
Patrick
-Message d'origine-
De : Robert Badaracco [mailto:[EMAIL PROTECTED]]
Envoy : mercredi 24 janvier 2001 05:47
: [EMAIL PROTECTED]
Objet : How to query and return
I'm afraid there is absolutely no documentation.
You can look for some examples in the MYISAM sources directory.
You just have to be aware that this API is not available in Client/Server
mode. Furthermore, I don't think it will be possible to access the same data
through SQL and Isam at the same
Hi Mac,
Please read up on the security setup Section 6 (c:\mysql\docs) before
continuing. First understand before try.
Regards
Jacques
-Original Message-
From: Mac Martine [mailto:[EMAIL PROTECTED]]
Sent: 24 January 2001 08:17
To: Jacques Venter
Cc: [EMAIL PROTECTED]
Subject:
Hello
I wrote:
After upgrading to 3.23.31, FULLTEXT selects give often "error -1
from table handler" for me. [...]
Sergei Golubchik [EMAIL PROTECTED] wrote:
Thanks for a bug report! This would be fixed in a nex release.
Thanks. In 3.23.32 the test case I submitted apparently works
I'm afraid this borders on sql/db question material vs. specific mysql
material, but it stems from what I've read in the O'Reilly mysql book.
If I have a db, which has two tables that have about 15 fields each.
table_atable_b
a_idb_id
a_field1 b_field1
.
have you tried phpwebhosting.com, small but friendly, and amenable to many
requests.
-Original Message-
From: Margot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 24, 2001 12:56 AM
To: [EMAIL PROTECTED]
Subject: Any MySQL webhosts that allow 'load data infile' statement ?
Does
Hi
I've got a problem about Mysql table. if I insert several records in a
certain order, firstly it is ok, but when I delete them and insert those
records again (in the same sequence), But the order in MySql is totally
different. For instance, I have 78 records, when I do insert
secondly, it
In order to verify and perhaps solve the SMP problems I and others
have reported to this list I did a series of sql-bench tests this
morning. As suggested by the MySQL people the system is configured with
glibc 2.2 and 2.4 kernel. I then switched kernels to the default 2.2.16
SMP and ran the
This has nothing to do with PHP, and you should
never expect a relational database to store records
in a specific order.
If you need to order your data, you should create
a key field. Look up AUTO INCREMENT in the manual,
then, if you have trouble, read
I'm afraid this borders on sql/db question material vs. specific mysql
material, but it stems from what I've read in the O'Reilly mysql book.
If I have a db, which has two tables that have about 15 fields each.
cut
and they have a many to many relationship between them. Should I
a.
One of our users is getting the message "another user has changed this
database..etc save changes to clipboard or drop changes... etc",
when he tries to update certain fields in the table. The table has a
timestamp and a primary key. In fact, this user can change certain
fileds without
Thanks.
(I don't know where I was coming from with the JOIN stuff, should have gone
to bed hours ago)
However, you don't think I should have the "ab_id" column, which would be the
standard serial primary key for a table. Does a junction entity table not
need it's own record ids? Technically,
Any comments on the packages from ArabiaSoft and NuSphere?
Thanks
Frank
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this
Justin C. Darby writes:
Can anyone give me more information on directly using MyISAM directly in
applications? I'd heard that it was possible, but haven't ever seen any
information relating to the subject appear on this list. (I know there's a
libmyisam, but I don't know what to do with
I've found Abriasoft SQL Standard to be really really great. I've made apache/ssl/php
etc. systems from source tarballs, and it takes hours, and there is all kinds of
frustration and hassle. You can do the same, and it takes minutes, and really does it
_almost right_.
They seemed to miss the
Graeme B. Davis writes:
Any ideas on this error? I'd love to use fulltext, but the last server that
compiled for me was 3.23.14 :(
c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/var/home/ap
psweb/newmysql\"" -DDATADIR="\"/var/home/appsweb/newmysql/
Hi:
I use 3.22 and KDevelop 1.0 beta 4.
=20
Please send to me if you have C++ api demo.
Thank you!
Hi!
You can find dozen of C++ API demos in the source distro of MySQL++
API library, on our site.
Regards,
Sinisa
__ _ _ ___ == MySQL AB
Hi
Can anybody tell me what this error means
user@server#isamckh -av database/*.ISM
isamchk: error: 22 when opening ISAM-table 'database/tax.ISM'(all
tables)
System is RedHat 7.0 i386 SMP Standard Kernel
mysql-3.22.32 standard compile from source --prefix=/usr/local/mysql
Ive tried
Dylan,
Can you comment on the use of Perl vs. PHP with either of these?
Thanks
Frank
-Original Message-
From: Dylan Shea [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 24, 2001 7:06 AM
To: Frank J. Schmuck
Cc: [EMAIL PROTECTED]
Subject: Re: ArabiaSoft and NuSphere
I've found
Chuck
I'm trying to compile 3.23.31 on Solaris 2.7 also, and had the same problem. If
you either delete or rename the config.cache file, this will go away. The
config.cache file supplies default values to the configure script, and those
default values weren't suitable for our Solaris
I've had some db corruption on a few occasions, and luckily I was running the
following in a nightly cron...it has since first install saved my butt on
many an occasion. http://www.ocsny.com/main/index.ocs?url=mysqlbackup It
doesn't do anything magickal just uses mysqldump and a basic routine to
Will someone from the MySQL team (or anyone with this knowledge) please tell
me if the test suite has been run with RedHat 7.0 and Berkeley tables?
I am currently running RedHat 6.2 and Berkeley tables and transactions DO
work. I want to upgrade to RedHat 7.0, but not if transactions stop
Hi all,
I'm making a source distribution on Solaris.
Partway through the 'make install', I get this:
make[1]: Entering directory
`/home/csinger/mysql/mysql-3.23.31/libmysql'
make[1]: *** No rule to make target `libmysql.c', needed by
`libmysql.lo'. Stop.
A quick look in my
Well, it's not me, I found it with no problems.
1. Click on "Downloads"
2. Click on the first link under "MySQL database" (helpfully labelled
"Stable release, recommended")
3. Select your OS.
Seems sensible enough.
Cheers
Jon
-Original Message-
From: Gustav Wiberg [mailto:[EMAIL
Hi!
The mysql server (version 3.22.32-4) has hanged up, and the restarting
causes a part of the
*.ISM and *.ISD files are gone. Unfortuanetly, I have not got a backup
from these files :(
Is there any method to recover the mysql tables from the remaining
*.MYD, *MYI and *.frm
files ? Thanks for
Actuall, I agree with the earlier post, I did find that sometimes the
download connection to SourceForge quits half-way during the download.
My recommendation would be to try one of the mirror sites and download from
there since I don't think that they use SourceForge.
Good Luck,
Dennis
-
Say I have a table called Discharge that is indexed on Vessel + Voyage +
Port (Primary Key). It has thousands of records in it and continuously
grows. I now want to delete records where
Vessel = "USS ENTERPRISE"
Voyage = "005"
I want to delete all records with the above Vessel/Voyage. There
Steve Ruby wrote:
Elekes Attila wrote:
Hi!
The mysql server (version 3.22.32-4) has hanged up, and the restarting
causes a part of the
*.ISM and *.ISD files are gone. Unfortuanetly, I have not got a backup
from these files :(
Is there any method to recover the mysql tables from
How about Putty?
It is very simple, but it fulfills most of your needs.
http://www.chiark.greenend.org.uk/~sgtatham/putty/
// Tobias
- Original Message -
From: "Rajesh Prakasan" [EMAIL PROTECTED]
To: "Mysql" [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 2:03 PM
Subject:
Elekes Attila wrote:
Steve Ruby wrote:
Elekes Attila wrote:
Hi!
The mysql server (version 3.22.32-4) has hanged up, and the restarting
causes a part of the
*.ISM and *.ISD files are gone. Unfortuanetly, I have not got a backup
from these files :(
Is there any method
I have a problem with mysql_connect() when use character set for MySQL
server different from default (latin1).
Every time when I change charset PHP says:
Warning: MySQL Connection Failed: Can't initialize character set 17 (path:
default)
I've try to recompile PHP when MySQL compiled by
www.ssh.com
where will I get SSH client for Windows, so that it can interact with
Linux
Mysql server.
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/
I have had the following problem with both mysql 3.22 (using isamchk) and
3.23 (using myisamchk).
I use either isamchk table.ISM or isamchk -e table.ISM. The utility reports
a miscellaneous error (error: Record at: 20224201 Can't find key for
index: 2 for example).
I run the check again
Dear MySQL supporter,
I tried to install MySQL version 3.23.32 on our AIX machine but got
errors.
Source compilation also failed. Here are the situation I worked and
attached are error log files.
Binary Installation
released file : mysql-3.23.32-ibm-aix4.3.3.0-rs6000.tar.gz
error log
Here are attached files:
mysqlbug mysqlCmdLog mysqlSrcCmpErrLog
---
Dear MySQL supporter,
I tried to install MySQL version 3.23.32 on our AIX machine but got
errors.
Source compilation also failed. Here are the situation I worked and
attached are
Hi all,
I was wondering how I can display a date in this format 'DD/MM/YY'
As when I do a select statement and display the date I get it in this format
'DD-MM-YYY 00:00:00'
Which is kind of annoying.
I am using mySQL and also PHP.
Thanks in advance.
Sam Rose
Dear,
I am Tomcat 3.2 user and it is running on Windows 2000 Professional.
I used MS Access and Tomcat crashed everytime.
So I downloaded MySql (mm.mysql-2.0.1-bin.jar for JDBC , MySQL3.23,
MyODBC ) and still Tomcat is crashing.
I think the problem would be memory leaking caused by JDBC-ODBC
I'm doing NIDS work as a small part of my job and have setup MySQL 3.22.32 for
logging of alerts. My problem is that when a user accesses the db it gets
locked and the NIDS hangs if the read takes too long, forcing a reboot of the
NIDS box. I'm trying to determine if I replicate the db and do
Chuck Barnett wrote:
How do I copy the data from one table to another table with a time stamp
every night?
example: table A contains x,y,z.
at midnight, I want to copy table A's contents to table B (B has same
fields, just adds a date field) and reset x,y,z to zero.
what do you
Why am I getting this error. Is the rpm program not working. I am running as
user admin not root. I was told that I can still install mysql without using
the root user. The only thing i know is that when I went to that directory
below I don't have permission to write to that directory. I am
Thanks for replying.
I know the SQL commands, I want to know how to automate the whole sequence.
I've always written php pages that do the calls. I want to write a script
to do it on the server as a cron job or something.
thanks
Chuck
- Original Message -
From: "Steve Ruby" [EMAIL
Chuck Barnett wrote:
Thanks for replying.
I know the SQL commands, I want to know how to automate the whole sequence.
I've always written php pages that do the calls. I want to write a script
to do it on the server as a cron job or something.
Ahhh, pardon my confusion, since this the
if you've compiled php without apache support (separately from your normal
php with apache support) but with mySQL then you can write php scripts that
run from the command line. I usually keep a second php.ini for command line
scripts because they can run long. This all could be put in a CRON
I used to get this all the time, myself, when I was trying to update
a mysql database with Access 2000 through myodbc. Funny, at the time,
nobody else seemed to understand what I was talking about. Once I got
phpMyAdmin working, the problem became academic, but it never did get
solved.
I'm
After noticing all my PHP scripts using MySQL had stopped working, I
noticed that any attempt to look through databases mith mysql brought
up;
Can't read dir of '.' (Errcode: 9)
Can't read dir of './mysql' (Errcode: 9)
Database changed
I can no longer get any information from MySQL, and I'm
You might be able to build it from tarball as a regular user but access
to the RPM database (e.g. installing via RPM) requires root level
permissions.
On Wed, 24 Jan 2001, lkeeton spewed into the bitstream:
lWhy am I getting this error. Is the rpm program not working. I am running as
luser
I have a problem in 3.23.32,
The query
select * from table
repalce table values('','nextval+1)
returns me always nextval=1.
table has 1 row and the query runs fine in mysql 3.22.x
Any idea?
Thanks.
Hi everybody, I'm trying to install MySQL-3.22.32
on a RH 7.0 everything looks normal but the server
dies sending this message
mysqld: Can't find file: 'host.ISM' (errno: 2)
How do I fix this?, Where can I get this file? or How
can I build it?
Thanks
hi everybody !!!
i need to resolve the following query ( a silly one ) in a mysql server
3.22.30
and i get the following error:
mysql select count(distinct ip_dst) from iphdr;
ERROR 1064: You have an error in your SQL syntax near 'distinct ip_dst)
from iphdr' at line 1
mysql
On Wednesday 24 January 2001 09:47, Josef Chladek wrote:
I am currently investigating this. In the mean time, see if the following
workaround will solve the problem:
CHANGE MASTER TO
MASTER_HOST='your-master',MASTER_USER='user',MASTER_PASSWORD='mast
er-pass',
That feature is only available in 3.23, while you're running
3.22. Upgrade your server and you'll get it.
--
"There cannot be a crisis today. My schedule is already full."
--Henry Kissinger
-Original Message-
From: lrado [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 24,
It's one of MySQL's permission files which is usually in
/var/lib/mysql/mysql
If the file is there it may be permissioned incorrectly. It usually needs to
be owned by the mysql user and group so
cd /var/lib/mysql
chown mysql.mysql mysql -R
if this seems to be the problem.
The permission files in
On 24-Jan-01 Jesús Gómez Pastor wrote:
I have a problem in 3.23.32,
The query
select * from table
repalce table values('','nextval+1)
^^ ^
these might be a problem, in addition to your select/replace/(update)
confusion.
returns me always nextval=1.
no, it
Richard
Thanks for the info! I have just one more question. To get the structure of
the table I did a myisamchk and did a desc on the table. The output is shown
below. From this is it possible to determine the amount of RAM I would need
for a HEAP table?
Thanks!
MichaelT
MyISAM file:
Hello,
I am creating a mock site that has a money balance that people can login
and pretend to pay money for stuff online via my site.
I am using php with mysql to implement this.
How do I make sure that a balance for a particular account is (locked) so
only 1 spend for that account can
Hello monty,
I'm using mysql 3.23.32 on linux and it looks like there is a
problem with check/auto-recovery left:
On many of my servers I find the above in a log file:
24.Jan 23:45:07 : pid:1412 counter:32256 AllInOne MySqlEr
Query - #1034 [tor.local] - Incorrect key file for table:
Benjamin, beautifully put. Thank you both so much.
--Dylan Shea
Benjamin Pflugmann wrote:
Hi.
It's simply that you can look at (a_id,b_id) as a PRIMARY KEY. You
don't need an additional, aritificial sequence number ab_id.
CREATE TABLE table_ab (
a_id INT NOT NULL,
b_id INT NOT
Sounds like you want a mutex and you can use get_lock and release_lock in
mysql for that.
http://www.mysql.com/doc/M/i/Miscellaneous_functions.html
GET_LOCK(str,timeout)
Tries to obtain a lock with a name given by the string str, with a timeout
of timeout seconds. Returns 1 if the lock was
Randy,
My recommendation (and there are probably many people who will disagree with
me) is to use a "soft-lock" schema.
In your account table, add a field named lockedBy. I usually add a field
named lockedAt also as a timestamp.
the basic flow is this:
1: Check to see if the record has
Sounds good. You should probably have a cleaner process of some kind just in
case one of your threads dies before it can release the lock. I think with
get_lock you have a timeout that protects you from that. I'm curious about
the internals of get_lock - perhaps it's more efficient to use a soft
Hi--
As stated above, I'm a raw beginner looking for some (probably fairly
simple) SQL conceptual help. Having lurked for a while, I can see that
since this isn't MySQL-specific, there's probably a better forum in which I
can attempt to iron out my confusion.
Can anyone point me to a
start with:
http://www.sqlcourse.com/
At 01:44 PM 1/24/2001 -0800, Jason Witherspoon wrote:
Hi--
As stated above, I'm a raw beginner looking for some (probably fairly
simple) SQL conceptual help. Having lurked for a while, I can see that
since this isn't MySQL-specific, there's probably a
Hi Jason,
You have found the right place.
No one here minds you asking simple questions, so long as you have checked
the manual and the list archive before asking. In particular, Red Hat
installs are a frequent topic.
This list is supposed to be MySQL specific, but sometimes we get a little
I haven't participated, but the site at
www.sqlteam.com
looks useful and does have a number of forums there.
HTH,
G.
-Original Message-
From: Jason Witherspoon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 25 January 2001 8:14
To: [EMAIL PROTECTED]
Subject: rank newbie looking for
Hi,
If my calculations are correct, your table will grow quite a lot
if you change from the MyISAM format to HEAP. The space to hold
the data will be roughly 1.3GB (a double of what it's with MyISAM!)
and the index will be another 1.3GB. Pretty huge, isn't it?
I think the dynamic row format
On Wed, Jan 24, 2001 at 03:15:48PM -0600, Kevin Day wrote:
Does this only occur when more than one client is accessing the table
in question? If so, it's a thread-related problem that has been with
us since FreeBSD 3.x. :-(
It looks like what I've seen before.
I have a re-produceable case that
On Wed, Jan 24, 2001 at 05:09:59PM -0600, Kevin Day wrote:
I don't know why configure doesn't think I have snprintf, but I
guess I'm glad it doesn't, because shouldn't that cause bad things
if I did? shouldn't the line be:
snprintf(to,val_buffer-length(),"%.*f",dec,nr);
In any
On Wed, Jan 24, 2001 at 05:20:30PM -0500, Kent Hoover wrote:
Can I add, activate, and use a new UDF function to an already
existing udf_.so library without restarting MySQL server?
Yes.
--
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 328-7878Fax: (408)
DBI is the database interface for Perl, I assume this bench mark uses perl
so you will need to install the DBI.
- Original Message -
From: "MacDonell, Dennis" [EMAIL PROTECTED]
To: "'MySQL List'" [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 5:51 PM
Subject: Running mysql tests
Hi,
you need to install the perl DBI package!
What is DBI, sounds like data base interface or something like that. Do I
need a latter perl or a different configure for my perl???
"The DBI is a database interface module for Perl. It defines a set of
methods, variables and conventions that
Did you ever get an answer?
I played with some queries and came up with this:
SELECT ID, NAME, RATING FROM SINGLEMALTS ORDER BY RATING DESC LIMIT 0,1;
If you want more than one record, you can change the 1 at the end to how
many you want. If you want to list them all in that order, you can take
Today I had an unsuccessful intallation of mysql 3.22.32 (RPM) server on a
Cobalt Raq 3 Server. I am not quite sure why the file didn't install but the
2202 can't find var/lib/mysql mysql.sock error continues to be an error when
starting safe_mysqld server. How can I solve this problem? I went
hello-
I'm getting a parse error here...any ideas why? This is my first try at databases,
php, mysql and odbc, so.
the database is one which i made in MSaccess...
thanks-
html
head
title/title
/head
body bgcolor="#66" link="#CC" vlink="#CC" alink="#CC" text="#00"
?php
Hi,
as far as I can see that, you forgot the $ sign in front of the odbc_db
variable at the line, that causes the error.
bye,
Thiemo
Mac Martine schrieb:
hello-
I'm getting a parse error here...any ideas why? This is my first try at databases,
php, mysql and odbc, so.
the
I have a couple of questions regarding replication in MySQL:
1) does it work well/handle loss of connections due to network
outages/delays; we have a geographically diverse environment, and were
hoping to be able to replicate the data across the connections (which
may have outages from time to
At 09:58 PM 1/23/01 , Manuel Leos wrote:
Hi everybody, I'm trying to install the RPM on a RH
7.0 everything looks normal but the server dies
sending this message
mysqld: Can't find file: 'host.ISM' (errno: 2)
It's part of the first database/table that MySQL sets up for you.
I get this error
oh, true..thanks!
actually its now saying:
isnt odbc_connect() a predefined function?
Fatal error: Call to unsupported or undefined function odbc_connect()
-hmmm...
mac
- Original Message -
From: Thiemo Nagel [EMAIL PROTECTED]
To: Mac Martine [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent:
Hi,
I am creating a web site which allows users to post projects and then others
to place bids. I am setting up two tables in MySQL 'Projects' 'Bids' my
problem is how best to cross reference. What I was thinking of doing is
creating a number of fields in the Projects table...
Bid1
Bid2
Hi Greg,
Thanks for that, perhaps I should drink more coffee help my brain to be a bit
more active at 5.30 in the morning.
Cheers
Ade
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
Can anyone help me with this query???
I have a very big table (70.000 rows) which has several rows like this:
idproductdescription
1P1desc1
2P1desc2
and I want to transform it into:
idproductdescription
1
80 matches
Mail list logo