[PHP] Re: php-mysql problem

2007-04-03 Thread itoctopus
$sql = "SELECT count(Email) as numEmails, Email FROM mena_guests WHERE Voted='yes' GROUP BY Email ORDER BY numEmails DESC LIMIT $startingID, $items_numbers_list"; I answered this morning, I don't know why it got deleted -- itoctopus - http://www.itoctopus.com ""Me2resh Lists"" <[EMAIL PROTECTED]>

[PHP] Re: php-mysql problem

2007-04-03 Thread itoctopus
$sql = "SELECT count(Email) as numEmails, Email FROM mena_guests WHERE Voted='yes' GROUP BY Email ORDER BY numEmails DESC LIMIT $startingID, $items_numbers_list"; -- itoctopus - http://www.itoctopus.com ""Me2resh Lists"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi > i need hel

Re: [PHP] Re: php mysql problem

2006-05-03 Thread chris smith
On 5/3/06, Richard Lynch <[EMAIL PROTECTED]> wrote: On Tue, May 2, 2006 7:22 am, chris smith wrote: > On 5/2/06, Ross <[EMAIL PROTECTED]> wrote: >> This is my database now...I will use the item_id for the order but >> what if I >> want to change item_id 3 to item id 1? How can I push all the item

Re: [PHP] Re: php mysql problem

2006-05-03 Thread Richard Lynch
On Tue, May 2, 2006 7:22 am, chris smith wrote: > On 5/2/06, Ross <[EMAIL PROTECTED]> wrote: >> This is my database now...I will use the item_id for the order but >> what if I >> want to change item_id 3 to item id 1? How can I push all the items >> down one >> place? How can I delete any gaps when

Re: [PHP] Re: php mysql problem

2006-05-03 Thread Richard Lynch
On Tue, May 2, 2006 7:05 am, Ross wrote: > This is my database now...I will use the item_id for the order but > what if I > want to change item_id 3 to item id 1? How can I push all the items > down one > place? How can I delete any gaps when items are deleted. Change item_id 3 to 1. ... select i

Re: [PHP] Re: php mysql problem

2006-05-02 Thread Dave Goodchild
Exactly - I don't think you really understand how a relational database works. The ids are retained as they may relate to records in another table. Internal sorting order is of no relevance at the application level. I think you need to rethink your design a little. On 02/05/06, T.Lensselink <[EMA

Re: [PHP] Re: php mysql problem

2006-05-02 Thread T.Lensselink
> This is my database now...I will use the item_id for the order but what if > I > want to change item_id 3 to item id 1? How can I push all the items down > one > place? How can I delete any gaps when items are deleted. > > > CREATE TABLE `board_papers` ( > `id` int(4) NOT NULL auto_increment, >

Re: [PHP] Re: php mysql problem

2006-05-02 Thread chris smith
On 5/2/06, Ross <[EMAIL PROTECTED]> wrote: This is my database now...I will use the item_id for the order but what if I want to change item_id 3 to item id 1? How can I push all the items down one place? How can I delete any gaps when items are deleted. Why do you want to do that? There's no be

[PHP] Re: php mysql problem

2006-05-02 Thread Ross
This is my database now...I will use the item_id for the order but what if I want to change item_id 3 to item id 1? How can I push all the items down one place? How can I delete any gaps when items are deleted. CREATE TABLE `board_papers` ( `id` int(4) NOT NULL auto_increment, `doc_date` va

[PHP] Re: php mysql problem

2006-05-02 Thread Barry
Ross schrieb: Just say I have a db CREATE TABLE `mytable` ( `id` int(4) NOT NULL auto_increment, `fileName` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; when I add items they go id 1,2,3 etc. Whn I delete them gaps appear. 1

[PHP] Re: PHP, MySQL problem

2004-01-14 Thread Jan Grafström
Hi Add records with this code. name address Hope this helps. Jan "Nicolai Elmqvist" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Hi > > I have just started working with PHP and MySQL and have gone through 3 > tutorials on how to add and delete records from a databa