> Subject: probably a stupid question
>
>
> Hey,
> Here is what I want to do
> I have 2tables
> let's say table A and B for simplicity.
> in table A I have column id
> and in table B I have column A_id
>
> I insert a new value into table A insert into a values(NUL
On 18-Jun-2003 Jonas Geiregat wrote:
> I insert a new value into table A insert into a values(NULL)
> Since id is auto_incremenet and the primary key it will have an auto
> value.
> Now I want that the column A_id contains that id nr.
> I could query for the biggest id in column A and insert t
Check out LAST_INSERT_ID() in the manual
-Original Message-
From: Jonas Geiregat [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 12:26 PM
To: 'Mysql'
Subject: probably a stupid question
Hey,
Here is what I want to do
I have 2tables
let's say table A and B for
Hey,
Here is what I want to do
I have 2tables
let's say table A and B for simplicity.
in table A I have column id
and in table B I have column A_id
I insert a new value into table A insert into a values(NULL)
Since id is auto_incremenet and the primary key it will have an auto value.
Now I want tha
hat one.
Tim Ward
Internet chess www.chessish.com <http://www.chessish.com>
--
From: Chuck "PUP" Payne [SMTP:[EMAIL PROTECTED]]
Sent: 11 March 2002 02:59
To: Cary; mysql lists.mysql.com
Cc: PHP General
Subject: Re: [PHP] Re: A stu
G'day Daren
> $query = "SELECT * FROM tbl_name WHERE LEFT(last_name, 1) == '$letter')";
> NOTE: LEFT() is a "special" function, I'd consider it a derivative of
> SUBSTRING()
Does MySQL have a function that can selectively return words from a column?
What I'm looking for is the equivalent of
lists.mysql.com
Cc: PHP General
Subject: Re: [PHP] Re: A stupid question...
I want to sort by a letter in a colomn. Let say I want to sort the
colomn
last_name. I can do order by but I can do just the A's.
http://www.myserver.com/mysort.php?Letter=A
Like to create a link on a web "A&qu
---Original Message-
From: michael kimsal [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 10, 2002 8:17 PM
To: Chuck \ Pup\\ Payne
Cc: mysql lists.mysql.com
Subject: Re: [PHP] Re: A stupid question...
Chuck "Pup" Payne wrote:
> I want to sort by a letter in a colomn. Let say I wan
Chuck "Pup" Payne wrote:
> I want to sort by a letter in a colomn. Let say I want to sort the colomn
> last_name. I can do order by but I can do just the A's.
>
> http://www.myserver.com/mysort.php?Letter=A
>
> Like to create a link on a web "A" then sort only the last name are A.
>
> I hope t
I want to sort by a letter in a colomn. Let say I want to sort the colomn
last_name. I can do order by but I can do just the A's.
http://www.myserver.com/mysort.php?Letter=A
Like to create a link on a web "A" then sort only the last name are A.
I hope that's helps. I can order by, but I can't
I want to sort my a letter in a set colomn. Let say I want to sort the
colomn last_name
http://www.myserver.com/mysort.php?Letter=A
Like to create a link like A then sort only the last name ore what ever I
want to sort by that letter.
I hope that's helps. I can order by, but I can't so a sort l
At 08:24 PM 3/10/02, Chuck \"PUP\" Payne wrote:
>Hi,
>
>I not a newie but I am not a pro at mysql either. I want to do a query by
>letter(a, b, c..ect.). Is there a simple way to do it. I am writing in PHP.
>So can someone please so me the how.
I'm not totally sure what your looking for. If you
Hi,
I not a newie but I am not a pro at mysql either. I want to do a query by
letter(a, b, c..ect.). Is there a simple way to do it. I am writing in PHP.
So can someone please so me the how.
| Chuck Payne |
| Magi Design and Support |
| www.magides
On 08-Jul-01 Jonah Klimack wrote:
>
> What I don't want, is the same category name and
> customerID twice, even if it does have an index column
> that differentiates it from other rows.
>
>
> I've tried this:
> ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
> customerID INT UNSIGNED,
> categor
> Use an index
If you mean use a primary key to create a unique record
regardless of the other data in the row, I've already done
that. However I'm using that primary key as a means of
creating a relationship with another table.
What I don't want, is the same category name and
customerID twice,
Jeremy Zawodny wrote:
> On Sat, Jul 07, 2001 at 07:22:19AM -0700, Ken Sommers wrote:
>
>> Does it make any sense to create an index on the primary key?
>
> Primary Keys are automatically indexed. In fact, you might say that a
> primary key is just a special type of index (it is).
There are som
Use an index.
--
Jonah Klimack wrote:
>
> Hi
>
> I want to enforce unique records in one of my
> tables.
>
> The table goes like this:
>
> ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
> customerID INT UNSIGNED,
> categoryname VARCHAR(20)
>
> With customer ID pointing to a custome
Hi
I want to enforce unique records in one of my
tables.
The table goes like this:
ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
customerID INT UNSIGNED,
categoryname VARCHAR(20)
With customer ID pointing to a customers table.
I suddenly realized that one customer could input
the same "category
On Sat, Jul 07, 2001 at 07:22:19AM -0700, Ken Sommers wrote:
>
> Does it make any sense to create an index on the primary key?
Primary Keys are automatically indexed. In fact, you might say that a
primary key is just a special type of index (it is).
Jeremy
--
Jeremy D. Zawodny, <[EMAIL PROTECTE
HI,
Does it make any sense to create an index on the primary key?
Ken
- Original Message -
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "Fournier Jocelyn [Presence-PC]" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 3:49 PM
At 12:14 AM +0200 7/7/01, Fournier Jocelyn [Presence-PC] wrote:
>Hi,
>
>Is there any structural difference between a PRIMARY KEY and a UNIQUE key ?
>
>Thanks ;)
>
>Jocelyn Fournier
>Presence-PC
>www.presence-pc.com
They're mostly the same, with these differences:
There can only be one PRIMARY KE
21 matches
Mail list logo