RE: Simple problem: Blank search box returns all records

2001-10-29 Thread Andrew Murphy

Hi,

This is more of a jsp/html/javascript issue.
It is relatively easy to create a small procedure/function in javascript/jsp
which checks all the fields are not emtpy, and gives a warning message when
you click on the submit button.

Its much easier to run the validation before sending the requests off to
mysql so the query will be simpler, and therefore execute much faster.

Andrew Murphy


-Original Message-
From: BadgerBay [mailto:[EMAIL PROTECTED]]
Sent: 27 October 2001 6:00 am
To: [EMAIL PROTECTED]
Subject: Simple problem: Blank search box returns all records


How do I avoid search problems when a user leaves a search box empty on an
Ultradev search page running jserv and attached to a MySQL database?

I have three search boxes: Author, Title, and Keyword
The user enters the search data into one, two, or all three of the fields,
and presses SUBMIT

(I use JSP), so the variables for the recordset are (ex. Author) :

Name: varAuthor
Default Value: %   [I also tried 1 ]
Run-Time Value: request.getParameter(txtAuthor)

The search uses this SQL logic:

SELECT Author, Title, Keyword
FROM tbJose
WHERE Author LIKE '%varAuthor%' OR Title LIKE '%varTitle%' OR Keyword LIKE
'%varKeyword%';

The search works perfectly , UNLESS A USER LEAVES ONE BOX EMPTY, then the
search RETURNS ALL RECORDS IN THE DATABASE,
whether the default value is % or is 1.

I do not want this to happen.
How might I modify the code? I am a SQL beginner so I need explicit
instructions.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Problem with query

2001-10-29 Thread Andrew Murphy

Hi,

Getting non-empty results when comparing something with NULL seems very odd
to me too.  Even if it is undefined, id expect to see an error message
telling me i shouldnt compare an undefined variable rather than receiving
results.

Why not ask someone to change things so that WHERE xx=NULL gives the same
results as  WHERE xx IS NULL.
Or would that be an unusual thing to request.

Andrew Murphy

-Original Message-
From: jim barchuk [mailto:[EMAIL PROTECTED]]
Sent: 27 October 2001 8:32 pm
To: Paul DuBois
Cc: [EMAIL PROTECTED]
Subject: Re: Problem with query


Hi Paul!

On Sat, 27 Oct 2001, Paul DuBois wrote:

 At 9:38 -0400 10/27/01, jim barchuk wrote:
 Hi Carl!
 
   Paul DuBois writes:
 
NULL basically means unknown value, so saying WHERE x = NULL
cannot
work, even if x is NULL.  That means where one unknown value =
another
unknown value, which cannot be evaluated with any certainty. :-)
 
   It is sort of odd, though, that x = NULL returns something which
   appears to be undefined rather than something well-defined
   (such as false all the time) or an error (which could be said to
   be well-defined, if errors are considered to be valid responses
   to queries...).
 
 Well which would you prefer, false or error? Dealing with errors is
 annoying if not necessary. 'False' is incorrect -if- the field is allowed
 to contain 'nothing' because NULL means it does contain nothing.

 I think what Carl meant was that it was strange that the WHERE x = NULL
 query returned a non-empty result set.  I noticed that in the original
 message, too.  I don't know what accounts for it.

I think WHERE x = NULL 'may' return non-empty results, or not, simply
because NULL is undefined and most bets are off for that query.

Undefined doesn't mean random. Yes,
http://www.mysql.com/doc/W/o/Working_with_NULL.html does say In MySQL, 0
or NULL means false and anything else means true. In this case I take
undefined to mean that what appears to work this time may not work next
time, depending on the structure of the query, or even if it works
consistently with one version of MySQL it may not with another.

Quoting page 47 of your book, If you attempt to use NULL with the usual
arithmetic comparison operators, the result is undefined. Similarly,
quoting http://www.mysql.com/doc/P/r/Problems_with_NULL.html , To look
for NULL values, you must use the IS NULL test. 'Must' is a very strong
word and I take it as gospel.

I think I have less problem with trying to understand what accounts for
something that may appear odd to others is that I don't try to think about
'why' when given such clear instrutions. I had a -very- educational
experience with NULL with my very first attempt at MySQL -- HTML
rendering. TABLE cells that -appeared- to contain something but shouldn't
have and really didn't. Had my head spinning for hours until I finally got
a grip on the idea that NULL is a Very Strange Thing and that I *must*
deal with it only in certain ways. NULL rocks. :)

Have a :) day!

jb

-- 
jim barchuk
[EMAIL PROTECTED]







-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Dont want to unsubscribe from mysql list

2001-10-26 Thread Andrew Murphy

Im not very happy about this :(

Someone is trying to unsubscribe me from the MySQL mailing list!
I havent confirmed the request as I dont want to unsubscribe.

Who is '[EMAIL PROTECTED]' ???

Andrew Murphy


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 25 October 2001 11:17 am
To: [EMAIL PROTECTED]
Subject: confirm unsubscribe from [EMAIL PROTECTED]


Hi! This is the ezmlm program. I'm managing the
[EMAIL PROTECTED] mailing list.

To confirm that you would like

   [EMAIL PROTECTED]

removed from the mysql mailing list, please send an empty reply 
to this address:

SNIP
...

SNIP

--- Enclosed is a copy of the request I received.

Return-Path: [EMAIL PROTECTED]
Received: (qmail 12535 invoked from network); 25 Oct 2001 10:16:34 -
Received: from unknown (HELO mail4.citiz.net) (61.151.248.37)
  by www.mysql.com with SMTP; 25 Oct 2001 10:16:34 -
Received: (mail 72245 invoked by uid 0); 25 Oct 2001 10:19:52 -
Received: from unknown (HELO wuhaihua) (61.169.79.15)
  by mail4.citiz.net with SMTP; 25 Oct 2001 10:19:52 -
Date: Thu, 25 Oct 2001 18:26:16 +0800
From: =?ISO-8859-1?Q?=CE=E2=BA=A3=BB=AA?= [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
[EMAIL PROTECTED]
Subject: 
X-mailer: FoxMail 3.11 Release [cn]
Mime-Version: 1.0
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: quoted-printable

mysql-unsubscribe-andrew.murphy=3Dase-solutions.co.uk=A3=AC=C4=FA=BA=C3=A3=A
1

[EMAIL PROTECTED]

=D6=C2
=C0=F1=A3=A1

=CE=E2=BA=A3=BB=AA
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: how to run sql script in NT

2001-10-26 Thread Andrew Murphy

Hi,

Try typing:
  mysql  Temp.sql
while at the DOS prompt.


Andrew


-Original Message-
From: Barbara Ferrell [mailto:[EMAIL PROTECTED]]
Sent: 26 October 2001 2:15 pm
To: [EMAIL PROTECTED]
Cc: barbara
Subject: how to run sql script in NT


i am extremely new at this:

i am on  NT4.0

i am in a DOS screen at the mysql prompt (mysql)
the path that is described in the top of the window is: =3D
c:\apache\mysql\bin\mysql.exe


i wrote a script to create and load a database exactly as it said in the =
=3D
book..  i saved the file as ..Temp.sql

then i typed:
mysql temp.sql ;  at the mysql prompt

it doesn't recognize the .sql file... how do I get it to run?



the temp.sql  file has this in it:

create database temp ;
USE DATABASE Temp;
CREATE TABLE Test_Table
(Test_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
Test_Name VARCHAR(30),
Test_Date DATETIME,
Test_Giver VARCHAR(30));
INSERT INTO Test_Table
(Test_ID, Test_Name, Test_Date, Test_Giver)
VALUES
(null, 'Test', '2000-01-01', 'barb');












-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Question about Encrypt function and Windows 2000 (Help a Newbie!)

2001-10-24 Thread Andrew Murphy

How about using only one-way passwords.   You could check that the encrypted
version of their entry matches the stored password data.   Its much safer
not decrypting anything like passwords.

Andrew

-Original Message-
From: Jeb [mailto:[EMAIL PROTECTED]]
Sent: 24 October 2001 10:41 am
To: mysql_mailing List
Subject: Question about Encrypt function and Windows 2000 (Help a
Newbie!)




I am working on a password scheme, however I read in the MySql manual that
if encrypt isn't available, it will return a null set.
This is causing a problem with something I am working on using a windows
2000 machine (with the recent version of MySql for windows platforms),   is
there a similar function that I can use?  or any other suggestions?  or I'm
a just doing something wrong?

The statement I am using is:

mysql select ENCRYPT(hello);
+--+
| ENCRYPT(hello) |
+--+
| NULL |
+--+
1 row in set (0.00 sec)

I may have found a solution using the PASSWORD function, however de-crypting
it may be handy


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Party!!!

2001-10-05 Thread Andrew Murphy

Sounds good, as the (altered) saying goes:

  Life begins at 4.0!


-Original Message-
From: Deryck Henson [mailto:[EMAIL PROTECTED]]
Sent: 04 October 2001 4:00 pm
To: MySQL
Subject: Party!!!


Hey everyone!  As most of you know the official (as in, not using a BASH
shell) release of MySQL 4.0 will be out very soon.  So, let's throw a party!
Not like something at someone's house (although I wish we could).  Just a
get - together online in a chat room with games, music (mp3s), and more!  Me
and whoever else wants to will plan it, we just need you people to come.  It
is a pretty long-shot but we could probaly do it.  My Web Server.

**
- Deryck Henson
- http://www.comp-u-exchange.com
**


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Non Ascii characters

2001-10-04 Thread Andrew Murphy

Hi,

Have you tried escaping the euro character '\€', maybe that would work for
you.

Andrew Murphy


-Original Message-
From: Jamie Smith [mailto:[EMAIL PROTECTED]]
Sent: 03 October 2001 11:23 am
To: Mysql@Lists. Mysql. Com
Subject: Non Ascii characters


I'm having a problem with the sending of the new euro € symbol into the
mysql database through a standard SQL stament. I have tried everything cut
and paste or ALT 0128 on the command line but all I seem to get is a ?
character stored. I know it can be done because I have managed to enter the
symbol using a program 'ArtAdmin' by artronic to enter the data but this
will not be usable because I am trying to write and web based from system to
submit information.
Can anyone tell me how to get this symbol in and are there any others that
might casue trouble.
I have not been able to find anything on this in the manual or previous
posts.

TIA
Jamie


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Disk-bound joins

2001-09-26 Thread Andrew Murphy

Hi,

Excuse me if this is wrong, but I think its the INNER JOIN which is slowing
down the query.

Wouldnt it be better (less memory intensive) to just use:
   FROM zipwork1 as z, pctwork1 as p   WHERE z.run_id = p.run_id
to join the tables if they are 1-1 related.


Andrew Murphy


-Original Message-
From: Will French [mailto:[EMAIL PROTECTED]]
Sent: 26 September 2001 7:23 am
To: [EMAIL PROTECTED]
Subject: Disk-bound joins


Hi all,

I have two very large tables (4 million recs each) where the records from
each have a 1-to-1 relationship.  They share a primary key (int) and there
are no unmatched records in either table (i.e. it is a true 1-to-1).  I am
trying to combine a few columns from each of the two tables into a new third
table.  No matter what I do, the select statement process becomes disk-bound
(low processor utilization despite no competition, tons of disk activity,
excrutiatingly slow).  Why is this?  Has anyone else encountered this kind
of trouble?

I have gobs of memory (1.25Gb) and I am using the settings from my-huge.cnf.
I have a reasonable processor - 733Mhz (not that its doing anything).  I
have a ATA-100 IDE hard disk, on a dedicated controller completely devoted
to mysql.  I am using mysql 3.23.41 on Win2k.

My tables are as follows:

CREATE TABLE zipwork1 (
runid int not null primary key,
zip char(5),
plus4 char(4),
addrerr tinyint
);  /*  This table has 4,014,438 records */

CREATE TABLE pctwork1 (
runid int not null primary key,
cnty char(3) not null,
precinct char(3) not null,
cd tinyint,
sd tinyint,
hd tinyint
);  /* This table also has 4,014,438 records */

CREATE TABLE zippctmapwork (
runid int not null,
zip char(5),
plus4 char(4),
addrerr tinyint,
cnty char(3),
precinct char(3),
cd tinyint,
sd tinyint,
hd tinyint
);  /* This is the table I am trying to populate (starts out empty) */

Here is my statement:
INSERT INTO zippctmapwork (runid, zip, plus4, addrerr, cnty, precinct, cd,
sd, hd)
SELECT z.runid, z.zip, z.plus4, z.addrerr, p.cnty, p.precinct, p.cd, p.sd,
p.hd
FROM zipwork1 AS z INNER JOIN pctwork1 as p ON z.runid = p.runid;

This is taking almost 20 minutes to execute.  20 minutes is great compared
to when I try this on the 2 tables that zipwork1 and pctwork1 are originated
from (zipwork1 and pctwork1 are subset tables I created to try and speed
this thing up).  When I ran it on the original tables, I had to kill it
after 100 minutes and it had not even begun writing to the result table yet.

Anyone have any ideas... anyone?

Thanks in advance for your help

Will French


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: command prompt

2001-09-24 Thread Andrew Murphy

Hi,

If you want to enter MySQL commands for making tables etc, run
'c:\mysql\bin\mysql.exe' (If thats where its installed on your machine),
from either the DOS command line (cmd) or the windows 'Run...' box.

Andrew

-Original Message-
From: John Nyukuri [mailto:[EMAIL PROTECTED]]
Sent: 24 September 2001 12:04 pm
To: [EMAIL PROTECTED]
Subject: command prompt


I downloaded the installation.zip mysql version onto a windowsNT machine
on a network.I installed it as a standalone server unfortunately  I am
unable to find the command prompt inorder to begin executing commands,can
you specify for me the file I should open.


--

For a few bucks, you can save hundreds! Right now, CollegeClub.com members
can get a Student Advantage Membership for ONLY $10.
Save on everything students want! http://www.collegeclub.com/sacard



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Illegal table names

2001-09-20 Thread Andrew Murphy

Try using:

drop table `resultat impl VT2001`;


-Original Message-
From: Håkan Elmqvist [mailto:[EMAIL PROTECTED]]
Sent: 20 September 2001 9:34 am
To: [EMAIL PROTECTED]
Subject: Illegal table names


mysql drop `resultat impl VT2001`;
ERROR 1064: You have an error in your SQL syntax near 'resultat impl 
VT2001`' at line 1
I don't seem to have the proper character `. What's the ASCII?
H


Professor Håkan Elmqvist
Avdelningen för medicinsk teknik
Institutionen för medicinsk laboratorievetenskap  teknik
KAROLINSKA INSTITUTET
Novum
141 57 Huddinge
Tel 46-8-585 837 55, Fax 46-8-779 55 50
epost [EMAIL PROTECTED]
Organisationsno. 01 202100-2973 01
Vat No. SE 202100297301 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Video game programming????

2001-09-12 Thread Andrew Murphy

database, sql, query, table
database, sql, query, table
(I hate 123box.co.uk)


Im not gonna go into long discussions of game programming in here.

But the reason most people dont use a database backend for most modern games
is more a matter of speed than anything else.  You cant get an average of
over 45fps in anything but a simple game, if you are storing the data in a
database.
Its much faster to use a c++ class, or good old c struct to store data than
use an interface to a database.

Im sure there are many types of games where a database would be suitable.
But most 'video games' are all about high-speed constant action which
require incredibly fast data processing.

Im not against MySQL at all, its great for my work requirements, im just not
sure its suitable for a 'video game'.

Andrew


-Original Message-
From: Robert Cross [mailto:[EMAIL PROTECTED]]
Sent: 12 September 2001 10:31 am
To: Nilesh Parmar
Cc: [EMAIL PROTECTED]
Subject: Re: Video game programming




It has a wierd review from someone which says
I was extremely dissapointed to say the least. This book doesn't even
begin
to cover **video game programming in mySQL**, not even the basics. In
fact,
it doesn't cover **video game programming at all**. . blah blah .
What's video game programming got to do
with MySQL ??

Hi Nilesh, yes I saw that 'review' as well and my first thought was boy,
what a class 1 jerk!
(or a SQL Server advocate - same thing ;-) ! ). But then I got to thinking:
1.   Two of MySQL's strengths are that it's small and fast - pre-requisites
for video game work.
2.   Most (and I would have thought all) games have pretty extensive data
structures for player position, position
of bad guys, ammo etc.

Given this why couldn't MySQL be used as the data backend for a video game?
In fact, once the geniuses at MySQL give us
peer-to-peer replication then this would be ideal for some kind of MUD-type
game, (each player would effectively have a local
copy of the DB, transmit their moves out and receive other peoples moves).
Even without this you could do a type of DOOM, where
all the layout would be stored in the DB, heck, you could even have a
leave-rejoin facility for multiple players, (single player game) since the
DB could be used to store the users configuration, the same way it can be
used to store personalised Web page configuration. Or maybe
something similar to the old SGI flight/dog 'sims', (that was an ace
timewaster and I sure wish someone would port it to Linux!)

Further it occurs to my fevered imagination that you could use Blender to
make the graphics bit for a DOOM clone, and link it to a MySQL backend, or
embed it.
AFAIK Blender uses Python and I seem to remember seeing a Python interface
to MySQL.

Ain't MySQL wonderful, and so flexible too!

Bob Cross, rapidly turning into a major MySQL advocate.
Disclaimer 1: The rabid dribblings above are personal to the author only,
my employer has much more common sense.




* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This message is confidential.  It may also be privileged or
protected by other legal rules.  It does not constitute an
offer or acceptance of an offer, nor shall it form any part
of a legally binding contract.  If you have received this
communication in error, please let us know by reply then
destroy it.  You should not use, print, copy the message or
disclose its contents to anyone.

E-mail is subject to possible data corruption, is not
secure, and its content does not necessarily represent the
opinion of this Company.  No representation or warranty is
made as to the accuracy or completeness of the information
and no liability can be accepted for any loss arising from
its use.

This e-mail and any attachments are not guaranteed to be
free from so-called computer viruses and it is recommended
that you check for such viruses before down-loading it to
your computer equipment.  This Company has no control over
other websites to which there may be hypertext links and no
liability can be accepted in relation to those sites.

Scottish  Newcastle plc
Registered in Scotland, Registered Number 16288
Registered Office: 33, Ellersly Road, Edinburgh, EH12 6HX
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

RE: Help needed getting table headings into an outfile

2001-09-10 Thread Andrew Murphy

Sorry, I should have given you more information about the problem.

We have a Java program, with a J2EE backend which is connected to a MySQL
database.
The database is running on a windows 2000 machine, and we want to output the
contents of the tables in text format(CSV).   I can get the formatting ok,
but it just needs the table headings.

Ideally we want to use one or more queries to do this, rather than using
mysqldump.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 10 September 2001 11:38 am
To: Andrew Murphy
Subject: Re: Help needed getting table headings into an outfile


I do this in perl to get the headers.  Perhaps you can adjust to fit into
your output script.

 my $statement = SELECT * FROM $table;
 my $sth = $dbh-prepare( $statement ) ;
 $sth-execute();
 my $fields = $sth-{NUM_OF_FIELDS};

 for ( my $i = 0 ; $i  $fields ; $i++ ) {

$name = $sth-{NAME}-[$i] ;
if ($i == 0) {
  $fldnames = $name ;
} else {
  $fldnames = $fldnames . | . $name ;
}
 }  # end of for loop
 $sth-finish();

Dirk Van Wie



Andrew Murphy [EMAIL PROTECTED] on 09/10/2001 12:33:50 PM
To:   'mysql Mailing List' [EMAIL PROTECTED]
cc:
Subject:  Help needed getting table headings into an outfile


Hi,

I keep sending this to the list, but im not sure if anyone else is getting
it.

I hope you can help me with this.
I am using the INTO OUTFILE 'filename' function, to create .CSV output
files
from my queries.
Whenever I do this, the table headings are removed from the output.  Is
there a way to get the table headings displayed in the output file?

Thanks in advance
Andrew

database, sql, query, table
database, sql, query, table
database, sql, query, table



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




HELP getting table headings into an OUTFILE

2001-09-03 Thread Andrew Murphy

Hi,

I am using the INTO OUTFILE 'filename' function, to create .CSV output files
from my queries.
Whenever I do this, the table headings are removed from the output.  Is
there a way to get the table headings displayed in the output file?

Andrew


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Join Problem

2001-08-29 Thread Andrew Murphy

You could try using an AND in the WHERE statement.

EG.  SELECT DISTINCT R.ID, R.CatCode, R.Title
 FROM Recipes R, Ingredients I
 WHERE I.Description LIKE %$SearchKey%
 AND R.ID = I.ID;

Hope this helps.

Andrew Murphy


-Original Message-
From: Urb LeJeune [mailto:[EMAIL PROTECTED]]
Sent: 29 August 2001 3:32 pm
To: [EMAIL PROTECTED]
Subject: Join Problem


I've been staring at the following query for a day. I'm sure it's
something obvious but I just don't see it.

There are two table, Recipes which contains one row per
recipe. The second in Ingredients while holds one row per
ingredient. The Ingredients table has a field containing the
parent recipe ID. I want to perform a query on the Ingredients
Description field and return from the Recipes table distinct
parent ID, Category Code, and Title. Here is my query:

SELECT DISTINCT R.ID, R.CatCode, R.Title
   FROM Recipes R, Ingredients I
   WHERE I.Description LIKE %$SearchKey%

If the LIKE clause produces any match, all Recipe rows are returned.
If there are no matches, zero rows are returned. To wit. if
$SearchKey = e all rows in Recipes are returned as they should.
If $SearchKey = rice all rows in Recipes are returned but only one
should be returned.

Any suggests would be appreciated.

Urb


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: RE: Use of the MySQL logo - licensing agreement

2001-08-29 Thread Andrew Murphy

Why not get MySQL to make a series of slightly different logos you can
choose from like Sun and other companies do. Some are colour, others
greyscale, and some are inverse for placement on black backgrounds.

Andrew Murphy


-Original Message-
From: Ed Carp [mailto:[EMAIL PROTECTED]]
Sent: 29 August 2001 3:34 pm
To: [EMAIL PROTECTED]
Subject: Re: RE: Use of the MySQL logo - licensing agreement


B. van Ouwerkerk ([EMAIL PROTECTED]) writes:

 Now.. what would you prefer.. many forks all using the same logo or that 
 they require you to ask for their permission.

Actually, I'd prefer a bunch of derivitive logos, like before, so I could
choose the best-looking database logo based on my web site look-and-feel :)
--
Ed Carp, N7EKG  -  [EMAIL PROTECTED]  -  214/341-4420 -
http://www.pobox.com/~erc

Is your web site data driven?  Are you swamped with work managing, updating,
and deploying that data on to your web site?  You need Escapade!  Check us
out at http://www.squishedmosquito.com/cgi-bin/esp?PAGE=esp_intro.html

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Table headings in OUTFILE

2001-08-24 Thread Andrew Murphy

Hi,

I am using the INTO OUTFILE 'filename' function, to create .CSV output files
from my queries.
Whenever I do this, the table headings are removed from the output.  Is
there a way to get the table headings displayed in the output file?

Andrew


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php