Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: MySQL query


  • Subject: Re: lug-bg: MySQL query
  • From: tzz@xxxxxxxxxxxx (Ted Zlatanov)
  • Date: Sun, 17 Nov 2002 13:21:53 -0500



On Sun, 17 Nov 2002, tpenev@xxxxxx wrote:
> zdrasti lug-bg,
> 
> imam slednoto pitane:
> MySQL tablica s razlichni poleta -
> 
> +--------+----------+
> | id      | name    |
> +---------+---------+
> | 1       | joe     |
> +---------+---------+
> | 2       | jane    |
> +---------+---------+
> | n       | bill    |
> +---------+---------+
> 
> 
> celta e da vzema stoinostta na nai-goliamato 'id' (n)
> (ili poslednoto) i da go vkaram v php code.
> neshto kato SELECT id FROM table ORDER BY id WHERE id = '...'
> ...
> posle da uvelicha biggest id + 1 za nov zapis i t.n.

·ÐéÞ ÝÕ Ø×ßÞÛ×ÒÐè auto_increment?

CREATE TABLE names (
        name varchar(200),
        id int(11) auto_increment not null,
        PRIMARY KEY (id)
);

ÁÛÕÔ âÞÒÐ, ÚÐâÞ ×ÐßØèÕè ÝÞÒÞ ØÜÕ, MySQL éÕ ãÒÕÛØçØ ID áêá 1
ÐÒâÞÜÐâØçÝÞ.  ¿àÞáâÞ ÝÕ Ø×ßÞÛ×ÒÐÙ ID-âÞ ÚÞÓÐâÞ ×ÐßØáÒÐè ØÜÕâÞ.

°ÚÞ âØ âàïÑÒÐ ÜÐÚáØÜãÜêâ ÒáÕ ßÐÚ, ÒØÖ

http://www.mysql.com/doc/en/example-Maximum-column.html

ÂÕÞÔÞà

============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.