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

 

начало

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

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

семинари ...

документи

как да ...

 

 

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

RE: lug-bg: MySQL query


  • Subject: RE: lug-bg: MySQL query
  • From: bivol@xxxxxxxxx (Peter An. Zyumbilev)
  • Date: Sun, 17 Nov 2002 22:39:25 +0200



Kolegite tuk za sa pravi za auto_increment.
i az tak pravaia prosto naistibna e mnogo udobno, no normalnite hora ne
praviat taka...
zaradi problemi s "delete"...Kato iztriesh pole i ako ima auto_incremt ti
ostava "dupka"...
v MS Sql ima sturotia za resetvane na ID-to no pri mysql ne si spomniam dali
ia imashe ili ne...
ama togav stavat edni kashi...
Mislia che niama nisto losho da si go napravsih po tvoia  nachin.
zaivakate e:
select count(1) from my_table.
umishleno ne ti kazvam
select count(*) from my_table.
pri oracle tazi zaivka e po-bavna...
alternativa razbira se select max(colone);
kato skorost mislia che
select count(1) from my_table.
e nai barzata
Pozdravi,
BIVOL

Peter Angelov Zyumbilev
Web Developer & Administrator
web: http://www.bivol.net <http://www.bivol.net>
email: bivol@xxxxxxxxx <mailto:bivol@xxxxxxxxx>
tel. : + 359 88 966940

-----Original Message-----
From: owner-lug-bg@xxxxxxxxxxxxxxxxxx
[mailto:owner-lug-bg@xxxxxxxxxxxxxxxxxx]On Behalf Of Teodor Penev
Sent: Sunday, November 17, 2002 7:29 PM
To: lug-bg@xxxxxxxxxxxxxxxxxx
Subject: lug-bg: MySQL query

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.
predpolagam che moje da se vikat stoinosttie na id (vsichkite)
v php i posle da se vzema nai-goliamato, no ne moga da go izmislia
v momenta...

any ideas? 10x

-----------------------------------------------------------------
http://imot.GBG.bg - Èìîòúò, êîéòî òúðñèòå.
============================================================================
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
============================================================================

============================================================================
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.