Re: Primary keys

2004-03-24 Thread JOHN MEYER


So I can do something like SELECT * FROM  . $tablename . WHERE _rowid= 
$id (I'm using PHP and the primary key is a unique integer column in each of 
the tables).
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Primary keys
Date: Wed, 24 Mar 2004 13:28:58 +0200
JOHN MEYER [EMAIL PROTECTED] wrote:
 Is there a way to do a SQL Select and get a record without specifying 
the
 primary key.  Example.  I have two tables CANDLE and VOTIVES.  Can I 
define
 a select that says SELECT * FROM TABLE WHERE PRIMARY_KEY=...


No, You can't.
Only if PRIMARY or UNIQUE KEY consists of one integer column, you can refer 
to that column as _rowid:
	http://www.mysql.com/doc/en/CREATE_TABLE.html



--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
_
Find a broadband plan that fits. Great local deals on high-speed Internet 
access. 
https://broadband.msn.com/?pgmarket=en-us/go/onm00200360ave/direct/01/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Primary keys

2004-03-23 Thread JOHN MEYER
Is there a way to do a SQL Select and get a record without specifying the 
primary key.  Example.  I have two tables CANDLE and VOTIVES.  Can I define 
a select that says SELECT * FROM TABLE WHERE PRIMARY_KEY=...

John Meyer

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.com/go/onm00200415ave/direct/01/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Newbie Question

2002-12-03 Thread John Meyer
Brian,
You can go either way (PHP, Perl, or JSP) for querying the database.  My
personal preference is PHP. What is a lot more important, however, is to do
some serious database analysis and design.  From a guy who's working with a
database wtih only one field for address where there need to be five fields
(name, address, city, state and zip), this is probably the most important
part of the job.

-Original Message-
From: Colaluca, Brian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 11:25 AM
To: [EMAIL PROTECTED]
Subject: Newbie Question


Hello there.

I recently got a wild hair to set up an amateur web site that will allow a
group of friends to log and comment on bottles of wine.  Having never done
web development before, I set out to first research what relational database
I would use that would satisfy my need for maintaining three related tables:
an objective category of wines (1999 XYZZY Vineyard Cab), a subjective
category of wines (It sucked), and a user listing.  I found that MySQL
fits perfectly (my budget, that is), plus I wanted something to run off of
my Linux box.

Where to go from here is where I'm stuck now.  I am tossed between going
towards a scripting language like PHP or PERL, and embedding that directly
in my HTML, or possibly going the Java route.  Does XML have the capability
of directly querying the database?  I'm curious to hear what methodologies
have worked best for users of MySQL, keeping in mind a tight budget.  Is the
J2EE architecture worth looking more heavily into, or is that somewhat
overkill for what I'm trying to achieve?

One thing is certain, I would like to use either Mandrake or Red Hat for my
OS, and of course prefer to use Apache as my web server.

Other than that, I am open to suggestions or comments.

bjc-

:==  Brian J. Colaluca - Software Engineer
:==  DRS Technologies - ESG
===  [EMAIL PROTECTED]
===  phone:  (301) 921-8107


-
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: How to link tables in MySQL

2002-11-12 Thread John Meyer

AFAIK, MySQL doesn't have any sort of referential integrity checks with
fields.  conceptually, you can do it, and write your program to force it,
but the database itself doesn't have it.

John Meyer

P.S.  shouldn't it be table1.fieldA
-Original Message-
From: R. Hannes Niedner [mailto:hannes.niedner;gmx.net]
Sent: Tuesday, November 12, 2002 1:55 PM
To: MySQL Mailinglist
Subject: Re: How to link tables in MySQL


On 11/12/02 12:41 PM, tmb [EMAIL PROTECTED] wrote:

 2 - In MS Access you have to graphically connect the
 table id fields to tell Access how the tables relate.

 How do you do this In MySQL... from the command line
 I'm sure... just a code snippit or reference to one
 would be nice...

You join the tables using : WHERE fieldA.table1 = fieldB.table2

So check out the join syntax in the manual.

/h


-
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: 4.0 as a production relese?

2002-11-10 Thread John Meyer


-Original Message-
From: [EMAIL PROTECTED] [mailto:mysql;lists.mysql.com]
Sent: Sunday, November 10, 2002 6:53 PM
To: John Meyer
Subject: Re: 4.0 as a production relese?


Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

sql,query

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.

You have written the following:

Can anybody venture a guess as to when this will happen?


-
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: PHP bias

2002-11-09 Thread John Meyer
I'd suggest that he's just trolling.

-Original Message-
From: R. Hannes Niedner [mailto:hannes.niedner;gmx.net]
Sent: Saturday, November 09, 2002 9:27 PM
To: MySQL Mailinglist
Subject: Re: PHP bias


On 11/10/02 5:12 AM, Robert Macwange [EMAIL PROTECTED] wrote:

 I am bothers me.
 It bothers me that that the MySQL people have a bias towards PHP.
 PHP is an inferior language. Deal with perl instead.

 
 Robert

Ouch.Death to all fanatics!!!

Do you have any question or are you just boiling?
/h


-
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: True/False

2002-11-08 Thread John Meyer
You could use an integer (0 or 1) or an enum with the values 'y' or 'n'

-Original Message-
From: Tony Roberts [mailto:troberts;momuk.com]
Sent: Friday, November 08, 2002 4:26 AM
To: [EMAIL PROTECTED]
Subject: True/False


I am new to MySQL and I am attempting a new project to help me learn.

I the past I have used a Boolean data type for True/False, Yes/No type data.

What data type should be used to achieve the storage of this type of data in
MySQL?

I have bought the reference manual (a good buy IMHO) but so far can't find
the answer.

Regards


Tony Roberts
Mailbox Solutions Ltd
[EMAIL PROTECTED]
01777  700 600


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.389 / Virus Database: 220 - Release Date: 16/09/02




-
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: getting the number of years between two dates

2002-11-07 Thread John Meyer


sql,query

How do I do that?  The contaxt is that I want to get somebody's age based
upon the current date.


-
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: getting the number of years between two dates

2002-11-07 Thread John Meyer
Actually figured out one of my own:

FLOOR(PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM NOW()),EXTRACT(YEAR_MONTH FROM
UserDOB))/ 12) as Age

It's amazing what you can think of as soon as you ask the question.

-Original Message-
From: Michael T. Babcock [mailto:mbabcock;fibrespeed.net]
Sent: Thursday, November 07, 2002 1:58 PM
To: John Meyer
Cc: [EMAIL PROTECTED]
Subject: Re: getting the number of years between two dates


John Meyer wrote:

sql,query

How do I do that?  The contaxt is that I want to get somebody's age based
upon the current date.



There are several examples in the mailing list archives; but try
subtracting the UNIX_TIMESTAMP of each date (which is the time in
seconds) and then divide by the number of seconds in a year (~365*86400) ...

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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: Using Query Results in a Form

2002-11-05 Thread John Meyer
in php
?php
$result = mysql_query($sql);
$row = mysql_fetch_array($result,$sql);

?
input type=textbox name=email value?=$row[email]?
-Original Message-
From: John Coder [mailto:jcoder;insightbb.com]
Sent: Tuesday, November 05, 2002 7:04 PM
To: Ben C.
Cc: [EMAIL PROTECTED]
Subject: Re: Using Query Results in a Form


On Tue, 2002-11-05 at 20:23, Ben C. wrote:
 I am using the following query:

 $sql =SELECT company, name, email FROM $table_name
WHERE email = '$_POST[email]' AND password =
password('$_POST[password]');

 Then I am echoing the $email on my form (it works because the person has
posted their e-mail name when logging in).  How can I echo the company and
email on to my form as well.  Please help.

 Is this query on your form or the form that the person has filled out?

John Coder


-
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: Using Query Results in a Form

2002-11-05 Thread John Meyer
oops,
I meant mysql_fetch_array($result,MYSQL_ASSOC);

-Original Message-
From: John Meyer [mailto:johnmeyer_1978;yahoo.com]
Sent: Tuesday, November 05, 2002 7:10 PM
To: John Coder; Ben C.
Cc: [EMAIL PROTECTED]
Subject: RE: Using Query Results in a Form


in php
?php
$result = mysql_query($sql);
$row = mysql_fetch_array($result,$sql);

?
input type=textbox name=email value?=$row[email]?
-Original Message-
From: John Coder [mailto:jcoder;insightbb.com]
Sent: Tuesday, November 05, 2002 7:04 PM
To: Ben C.
Cc: [EMAIL PROTECTED]
Subject: Re: Using Query Results in a Form


On Tue, 2002-11-05 at 20:23, Ben C. wrote:
 I am using the following query:

 $sql =SELECT company, name, email FROM $table_name
WHERE email = '$_POST[email]' AND password =
password('$_POST[password]');

 Then I am echoing the $email on my form (it works because the person has
posted their e-mail name when logging in).  How can I echo the company and
email on to my form as well.  Please help.

 Is this query on your form or the form that the person has filled out?

John Coder


-
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


-
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




Creating users through SQL

2002-10-31 Thread John Meyer
How do I create users for a specific database using SQL?

-
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




BLOB inserts vs. storing filepath

2002-10-27 Thread John Meyer
Hi,  I've got a client that I'm trying to convince to store the file path in
the database rather than the file itself into the database.  Is there any
statistical data to show how much of a hit you take doing it as a BLOB vs. a
filepath?

sql,query


-
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: plz help...tables getting corrupted...

2002-10-27 Thread John Meyer
Try again.

-Original Message-
From: [EMAIL PROTECTED] [mailto:mysql;lists.mysql.com]
Sent: Sunday, October 27, 2002 9:17 PM
To: John Meyer
Subject: Re: RE: plz help...tables getting corrupted...


Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

sql,query

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.

You have written the following:




Yes.  Stop your machine from crashing :)


When he does that, he can stop Windows from crashing as well.


-
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




Different instances of mysqladmin

2002-01-08 Thread John Meyer

Can I have different instances of winmysqladmin start instanciating
different mysql's?  i want to run one for the stable version, and one for
mysql 4.0


-
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: To Chris Mercury

2001-12-26 Thread John Meyer


 database,sql,query,table
 Haven't been able to solve the File DSN problem yet (running into the
same
 thing as you), but I'm able to connect using a system dsn.  is there any
 reason why you need a file based one?0.



-
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: New world

2001-12-20 Thread John Meyer

At 06:41 PM 12/19/2001 +0100, Sven Hammann wrote:
Hello,
I'm new in the world of MySQL and have a question:

What Software can I use to programm MySQL clients for HTML(XML) or Java
? Is there a
Software which is easy to use ?


I usually use PHP solutions for HTML.  Java, you can use the JDBC drivers.


-
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: [OT] A News Group Perhaps.

2001-12-13 Thread John Meyer

At 11:45 AM 12/12/2001 -0500, Christopher Schreiber wrote:
Actually I setup a vBulletin forum for MySQL over at www.mysqlforums.com
and I am the moderator of the MySQL and Server Configuration forums over
at www.vbulletin.com/forum/

Would it be too much to suggest that mysql.com host its own news server or 
is that too pricey?


-
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: Newbie question

2001-10-18 Thread John Meyer

LAST_INSERT_ID()
At 08:48 AM 10/18/2001 +0100, you wrote:
Hi,

 I've just started with MySQL. I want my table to have a column 
 containing
an ID which is an integer that gets incremented on each insert, just like
Autonumber in Microsoft Access. How do I do this in MySQL ?

Thanks

Dave


-
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




Licensing terms for an Intranet site

2001-08-29 Thread John Meyer

If I'm using MySQL for an intranet site within my corporation, is there any 
licensing required?


-
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




Roles

2001-08-28 Thread John Meyer

In Oracle, I remember working with roles that I could assign to a user.  Is 
there such a mechanism, or are there plans to implement such a mechanism, 
in MySQL.


-
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: Roles

2001-08-28 Thread John Meyer

At 09:57 AM 8/28/01 -0700, you wrote:
  In Oracle, I remember working with roles that I could assign to a user.
Is
  there such a mechanism, or are there plans to implement such a mechanism,
  in MySQL.

This sounds a lot link granting a user certain privileges. Here's the part
of the documentation that talks about this:


Actually, you grant the permissions to a role (such as manager, 
secretary, etc), and then you grant the role to a specific user.  It madkes 
user management a whole lot easier.


-
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: Need Help Setting Up MySQL on Win98

2001-08-27 Thread John Meyer

At 12:54 PM 8/27/01 -0700, you wrote:
Hello -

I'm very new at this, so please pardon the very beginner questions...

I'm attemtping to install MySQL to my local machine running Win98. The
install seems to go alright, but when I try mysqld--standalone it
gives me an error. Then I tried mysqld -standalone, which seemed to
work.

Then I entered, mysqladmin create testDB and I got the error message
Can't connect to MySQL Server on 'localhost'. I tried telnetting to
telnet localhost 3306 and got an error that it couldn't connect.

Can anyone offer help?


Yeah, try double clicking on the winmysqladmin.exe icon.


-
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: image data type

2001-08-27 Thread John Meyer

At 09:15 AM 8/28/01 +1200, you wrote:
Hi there,

I treat image data type as text, does anyone know how to insert an image
into the table?


the image data type is actually a BLOB, not text.  Usually, it's more 
efficent to have the field be text, and just store the path to the image 
(C:\my\path\to\image.gif (Win32) or /home/user/path/to/image.gif (Unix)).



-
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: column_name

2001-08-22 Thread John Meyer

At 10:48 AM 8/22/01 -0400, you wrote:

For example if my table has the fieldfirstname,  lastname, telephone,
movie1, movie2, movie3..


You haven't done a good job of database normalization.  Those movies should 
be broken out to their own table.


Onto what you were talking about, I know that there is a DESCRIBE TABLENAME 
command.


-
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




MyODBC, MySQL, and a little bit of perl

2001-08-18 Thread John Meyer

Here's the error message that I am getting:

[911] [2] [0] [Microsoft][ODBC Driver Manager] Invalid string or buffer 
length


And here is the code


my $sqlcommand = INSERT INTO 
EMAILS(PERSONALITY_ID,EMAIL_HEADER,EMAIL_EMAIL,EMAIL_FROM,EMAIL_SUBJECT) 
VALUES(  . $personalid . ,\ . $headerlines . \,\ . $lines . \,\ 
. $from . \,\ . $subject . \);
   }
   $emails-sql($sqlcommand);



Any problems with that code that I don't see


-
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: Referential Integrity

2001-08-12 Thread John Meyer

At 11:02 PM 8/12/01 -0300, you wrote:
I read that MySQL doesn't support the referential integrity, so i wan to 
know if you recommend to use it in systems with complex relationated 
tables in a database.
If yes, where can i find helpfull documentation about that.
thanks
PD: sorry about my grammar and stuff, see i normally communicate in spanich =)


When MySQL says that it doesn't support referential integrity, all it means 
is that it doesn't set any constraints on drops or deletes if a foreign key 
points to that table.  You can make foreign keys perfectly okay, just 
remember that it is up to the individual programs that access the database 
to make sure they don't rip apart the database.


-
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!

2001-07-20 Thread John Meyer

At 08:50 AM 7/20/01 -0600, you wrote:
My website, which included a Microsoft Access database, was on a server that
went bye-bye.  I signed up with a new host that doesn't support MS
Access...and they suggested that I contact you to convert my database to
Mysql.

First off, download mysql from mysql.com, also download dbtools from the 
mysql web site.  Install both, then navigate to the mysql directory, enter 
the bin directory, and click on WinMySqlAdmin.  Once that is up, click on 
the dbtools icon and select Data-Import Data Wizard.  Select Access 
database, navigate to your access database, and run from there.  Then, 
click on Data-Export Database, and export the data that you just uploaded 
to your mysql server.



John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: [PHP] PHP MySQL

2001-07-20 Thread John Meyer

At 12:30 PM 7/20/01 -0400, you wrote:
on 7/20/01 12:32 PM, Erich Kolb at [EMAIL PROTECTED] wrote:

  When you query a MySQL Database, how do you set the order alphabetically?


If it's a text field just say DESC

Susan


isn't that reverse alphabetical
ASC is (default) alphabetical


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: not selecting last row

2001-07-20 Thread John Meyer

At 12:25 PM 7/20/01 -0500, Tyler Longren wrote:
Hi everyone,

Is there a way to NOT select the last row that was inserted into a table?  I
want everything before it.

I know how I could do this using 2+ queries, but can it be done by issuing
just 1 query?

Thanks everyone,
Tyler

Assuming you had a unique ID, couldn't you do it this way:

SELECT * FROM TABLE WHERE ID=!LAST_INSERT_ID();


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: Converting ACCESS or EXCEL Data to MySQL

2001-07-18 Thread John Meyer

At 08:47 AM 7/18/01 -0700, Dennis Salguero wrote:
Notice that I haven't really mentioned MySQL at all. As much as I like
MySQL, if you already have a SQL Server that can connect to the Internet, I
don't understand the need to use MySQL in this scenario ??? Obviously, if
this is a web page that will see a lot of traffic, or the SQL Server
database is no good or too big, then of course you can still use MySQL in
the same manner mentioned above. Just remember, that you will have to use a
new ODBC driver, MyODBC.

Good Luck,

Or, if you use PHP, an alternative to ASP, you can just use the built in 
functions to access MySQL.



John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: Any workaround for no union operation?

2001-07-15 Thread John Meyer

At 02:13 PM 7/15/01 +0300, Sinisa Milivojevic wrote:
Multi-table updates should come in 4.0, while sub-selects will come in
4.1.

Not to be a nag, but when will 4.x be here?



John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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




May not be related to the list quite exactly:

2001-07-12 Thread John Meyer

Products:
BCB 4 professional
MySQL latest
MyODBC latest

Here's the code I'm using

bool AnAuthor::CheckIfExists(int p_ID) {
 TQuery *CheckAuthor = new TQuery(NULL);
 AnsiString strQuery;
 bool retVal;
 strQuery = SELECT COUNT(*) AS AUTHORCOUNT FROM AUTHORS WHERE 
AUTHOR_ID= + AnsiString(p_ID);

 CheckAuthor-DatabaseName = bookcollection;
 CheckAuthor-SQL-Add(strQuery);
 CheckAuthor-Open();
 if (CheckAuthor-FieldByName(AUTHORCOUNT)-AsInteger = 1) {
 retVal = true;
 } else {
 retVal = false;
 }
 delete CheckAuthor;
 return retVal;
}


This way, it retrieves the recordcount exactly, but if I use

CheckAuthor-RecordCount
instead of:
CheckAuthor-FieldByName(AUTHORCOUNT).AsInteger
I get a nonsense answer.


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: Migrationfrom Access 2000 to MySQL

2001-07-09 Thread John Meyer

At 10:33 AM 7/9/01 +0200, Dominique Vellin wrote:
We have made up our mind to turn our Access 2000 database into a MySGL one.
Could you please explain us the path to follow and give us information about
it ?

Dominique Vellin
Business developement

I don't know how much this will help, but I've been using DBTools and it 
works for me.


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: Relational Database WITHOUT server?

2001-07-08 Thread John Meyer

At 10:36 AM 7/8/01 -0700, you wrote:
Hello,

I am creating a database that will be used by about 5 people very
infrequently.  I have looked into things like xbase, which would be
acceptable, but are there any relational db's with a c/c++ api that would
access the files directly without a server?  Is this possible?  If so, could
SQL be used with it?

Dan Mingus
[EMAIL PROTECTED]

You could look at Access, but using that across a network is the type of 
thing that gives me nightmares.  BTW, MySQL can run on a client computer, 
in case you're confusing a hardware server and a software server.


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: Storing multi-page texts

2001-07-08 Thread John Meyer

At 10:38 AM 7/8/01 -0800, Chris Lott wrote:
What kind of methods have any of you used for storing text that needs to be
displayed as both multi-page (for reading) and single-page (for printing)?
My plan is to store the articles with basic HTML formatting that will render
based on the site stylesheet(s).

I'm using MySQL.

My main question is how to deal with the multiple pages. Higher-ups would
prefer that article authors not have to split the file into various fields
when composing. My idea is to have the authors insert a code/comment that
indicates a page break in the text (something like, cryptically,
PAGEBREAK) and then when pulling the article from the DB, create a menu
for selecting pages (there has to be a small menu at the bottom of each
article with a link to each article page and an indication where the user
is), display the proper page, etc.

I've still not got my head completely around how I am going to do this, so I
am looking for suggestions on how other sites manage this need.

Why not just split on the newlines?  You could conceivably, say that you 
will limit yourself to 5 newlines (paragraphs) per page.  T


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: Relations between tables?

2001-07-04 Thread John Meyer

On Wed, 04 Jul 2001, Mohan Khurana wrote:
 database enthusiasts,
 
 I'm fairly new to database administration and development, I'm currently
 still learning about features of databases so that I can ensure that my
 design for the database that I create will be correct.  I will be storing
 general pieces of information in an index table that will store an ID #,
 which I wish to be incremented as more people are added to the index, the
 ID # should start with 0.  The index will also contain information like
 their name, the date of the last visit to the construction site, and how
 many total days they have worked.  One thing I'm not clear about is the
 notion of a primary key.  Is this provided just to allow for faster
 SQL calls that access records using that primary key?  Does specifying a
 primary key provide for more functionality in any way?

A primary key is a piece of information that uniquely identifies that piece of
data.  It can be a number, a string,  or even a group of numbers and/or strings,
but is has to exist (it cannot be null or lacking a value).  It is basically
the building block of all relational databases.
I would suggest getting a good book on database theory that will explain the
basics of keys, normalization, and E-R diagrams.  My favorite is Database
Systems:  Design, Implementation, and Management by Peter Rob and Carlos
Coronel.  

 -
 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
-- 
John Meyer
[EMAIL PROTECTED]
Programmer

Those who sacrifice liberty for security deserve neither -- Ben Franklin

-
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: asking for teaching?

2001-07-04 Thread John Meyer

On Wed, 04 Jul 2001, Shania Qiu wrote:
 Thank you, Luis,
 
 I type in 'login mysql', the system responded me with 'Welcome to Microsoft
 Telnet Server', then back to c:\, according to your instruction, i typed in
 create database test, the message ' 'create' is not recognized as an
 internal or external command, operable program or batch file.'
 
 I think the commands for windows are not the same as in linux. any ideas?
 

C:\mysql\bin\mysqladmin.exe create test

-- 
John Meyer
[EMAIL PROTECTED]
Programmer

Those who sacrifice liberty for security deserve neither -- Ben Franklin

-
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: ACCESS DB, and MySQL which one better to handle database driven webpage

2001-06-22 Thread John Meyer

On Friday 22 June 2001 09:22, [EMAIL PROTECTED] wrote:
 MySQL has is used by alot of major players and there are pre made setup for
 building database driven websites like PHP-Nuke. Unsure on the strings

 I use Win2K and Mysql PHP and PHP Nuke with Apache for my site and it's
 working great! My Linux Server has the same and also does excellent.

 Cheers

 Mike


If you use ODBC strings with DSN names, chances are you won't have to change 
much of the code.   Of course, this is slower than an Oprah Winfrey show, but 
it can be done.
There are some great tools out there that will help you make the migration 
between MDB and MySQL.  DBTools is one of my favorites.  Either way, if you 
are using a web page server, get away from the Access databases!

-
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: ACCESS DB, and MySQL which one better to handle database driv en webpage

2001-06-22 Thread John Meyer

It only corrupted your database twice?

On Friday 22 June 2001 09:50, Patrick Calkins wrote:

 MySQL can handle infinately more concurent connections to it, and handle a
 much bigger load than MDB can even dream of doing. A few years back I used
 to write database apps in visual basic and MDB. It was running on the
 network, with only about 5 people accessing it at one time. MDB had
 corrupted the files at least twice. 

-
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: Upgrade

2001-06-21 Thread John Meyer

On Thu, 21 Jun 2001, you wrote:
 I currently have MySQL-3.23.38-1.i386.rpm installed and I want to upgrade to
 the new version 3.23.39 what steps or precautions should I take when doing
 this.
 Do I just download the new RPM and run a rpm -i MySQL-3.23.39-1.i386.rpm
 and thats it or is there more to it?


Try rpm -Uvh instead of rpm -i

-
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: Connect mySQL with HTML or something

2001-06-21 Thread John Meyer

On Thu, 21 Jun 2001, Laura La Marcello wrote:
 I need to know if there is a way to create a searchable database that
 returns results as a web page...
 As you can see, I'm just begining, so I would really apreciate an answer,
 even if it's short.
 
 Thanks!


Yes, but the web page will more than likely be created by a second language,
such as PHP or ASP.

-
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: what is the difference between, MDB and MySQL

2001-06-21 Thread John Meyer

At 12:46 AM 6/22/01 -0300, Siomara Pantarotto wrote:
MySQL is a database just like others:

Oracle (Oracle)
SQL Server (Microsoft - for large systems)
Access (Microsoft - for small systems)
DB2(IBM)
etc...

MDB, as I know, is the termination (extension) given to a database 
generated by MS Access.

For example: NorthWind.mdb (example provided by Microsoft when you install 
Access)

Siomara

Plus, MySQL is a RDBMS designed for use over a network.  Access is a 
file-based database.  This isn't a knock against Microsoft, but the last 
thing you want to run over a network is an MDB, even with the proper file 
sharing.


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: Design question

2001-06-18 Thread John Meyer

This looks like an order-lineitem situation, which I would imagine would 
look like this:

ORDERS
ORDER_ID
CUSTOMER_ID
ORDER_DATE


LINEITEM
ORDER_ID
PRODUCT_ID
LINEITEM_QUANTITY


At 02:00 PM 6/18/2001 -0500, you wrote:
I have a design problem I was hoping some of you could help me out 
with.  I am writing a shopping
cart system (as if there wasn't enough already) and I have one problem 
that has me stumped.

A person can order more than one item of course.  So let's say they order 
a kite and some string.
Both of these have product numbers, and the overall order has an order 
number.  I am trying to
figure out how to design a table ( or tables ) so I can keep track of the 
different products that
are ordered during one order.  I need to keep track of the product number, 
quantity, and price
for that product.  For instance:

Order # Products
-  --
1   222 : Qty 1: 12.00 # 333 : Qty 2 : 14.00

That is order number 1 and that person ordered one of product # 222 @ 
12.00 and 2 of product # 333 @14.00.

I would appreciate any assistance any of you might be able to offer.  If I 
wasn't clear enough, let
me know and I will try and explain it better.

Thanks.

Jeff Jones

-
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

John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: SQL reference.

2001-06-18 Thread John Meyer

At 01:08 AM 6/19/2001 +0100, © webfroggie.com wrote:
Hi,

Is there a place where I can find a manual (not tutorial) of SQL
Reference/Sintax, something like the PHP Manual...
It could be about SQL in general, MySQL and/or Oracle.


Thanks,

Jorge Oliveira
[EMAIL PROTECTED]

The MySQL manual is availible from the site in PDF format.



John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


-
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: Selecting Distinct with MySQL and PHP4??

2001-06-10 Thread John Meyer

At 09:54 PM 6/10/2001 -0400, Jeffrey L. Fitzgerald wrote:

Howdy Hi,
Any word on how to select distinct database records using PHP code?? Thanks in
advance...


mysql_query(SELECT DISTINCT * FROM BLAH;);


-
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




<    1   2