Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Ross Riley #1
Re: reset id
I can't remember exactly but i think if you check the field and then click on 'operations' you can change the auto-increment there.
Ross
Ross Riley Guest
-
reset password
I forget my coldfusion server 6.1 administrator password. How can I get into it? Thank you jli@igi-usa.com -
CF and IIS Reset Together?
Wouldn't it be a good idea to restart ColdFusion and reset IIS during a CF outage? This assumes all web sites are CF-based. -
Using reset() and mysql_data_seek()
I was trying to make a page were I have printing out an array of results from a MYSQL query, then for interest, printed out the same results... -
How to reset
I actually posted here before several months ago and got a good solution but I can't remember it or find the old post. Someone here gave... -
DFS reset(s)
I am using a Windows XP Pro computer on a Windows 2000 Active Directory domain. The admin has scripts setup to use 2-mapped drives (J: and K:)that... -
gareth #2
Re: reset id
You could export the data from the table into a file, then export the table
structure only, deleting the auto increment field at the end of the table
structure. Use the SQL to recreate the table and then write a script to read
in the data and insert it back into the file, missing out the auto number
field, so its inserted automatically.
--
Gareth - TMM Dreamweaver
[url]http://www.dreamweavermxsupport.com/[/url]
[url]http://www.garethdp.com/[/url]
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
[url]http://www.phploginsuite.co.uk/[/url]
Co-Author: Dreamweaver MX: Instant Troubleshooter - Apress
Co-Author: Practical Intranet Development - Apress
Co-Author: Dreamweaver MX: Advanced PHP Web Development - Apress
Co-Author: Dreamweaver MX: PHP Web Development - Wrox
gareth Guest
-
lawrie #3
Re: reset id
Thanks guys,
tried the first but no luck......now working on gareths idea
"gareth" <gareth@buzzinet.co.uk> wrote in message
news:cuu08h$jbg$1@forums.macromedia.com...
: You could export the data from the table into a file, then export the
table
: structure only, deleting the auto increment field at the end of the table
: structure. Use the SQL to recreate the table and then write a script to
read
: in the data and insert it back into the file, missing out the auto number
: field, so its inserted automatically.
:
:
: --
: Gareth - TMM Dreamweaver
: [url]http://www.dreamweavermxsupport.com/[/url]
: [url]http://www.garethdp.com/[/url]
:
: PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
: [url]http://www.phploginsuite.co.uk/[/url]
:
: Co-Author: Dreamweaver MX: Instant Troubleshooter - Apress
: Co-Author: Practical Intranet Development - Apress
: Co-Author: Dreamweaver MX: Advanced PHP Web Development - Apress
: Co-Author: Dreamweaver MX: PHP Web Development - Wrox
:
:
lawrie Guest
-
Michael Fesser #4
Re: reset id
.oO(lawrie)
Nothing special.>I am using phpmyadmin with a mysql database.
>
>I have set the primary key ( a numerical value) to increase incrementally.
>
>After some time the range of id's become spread out.
Why?>Can the key be recalibrated back to 1,2,3......etc.
Usually a primary key is written one time and then never touched again.>I ask this as a client wants to reorder images and I am trying to change the
>CM to accomodate this. It would help if the id's were all within a
>managable range.
Why should it be necessary to rearrange the records? They are still in
order, even if some IDs are missing. If you have to recreate the primary
keys then IMHO there's something wrong.
Micha
Michael Fesser Guest
-
lawrie #5
Re: reset id
"Michael Fesser" <netizen@gmx.net> wrote in message
news:bhu611h9c492pp89dilp3eeb55qfjmiont@4ax.com...
: .oO(lawrie)
:
: >I am using phpmyadmin with a mysql database.
: >
: >I have set the primary key ( a numerical value) to increase
incrementally.
: >
: >After some time the range of id's become spread out.
:
: Nothing special.
:
: >Can the key be recalibrated back to 1,2,3......etc.
:
: Why?
:
: >I ask this as a client wants to reorder images and I am trying to change
the
: >CM to accomodate this. It would help if the id's were all within a
: >managable range.
:
: Usually a primary key is written one time and then never touched again.
: Why should it be necessary to rearrange the records? They are still in
: order, even if some IDs are missing. If you have to recreate the primary
: keys then IMHO there's something wrong.
Yes, well I guess something is wrong.
The client has two pages of jewellery products that are drawn from a
database she manages.
No problem. She uploads images & info from a simple admin I have set up.
She now thinks, rightly, that if she creates a piece a pendant which
complements some earrings then it would be good if this new piece 'p' could
follow the existing piece 'e' in the gallery.
I can order the products by date or id or ....but I cannot think of a way
for her to get 'f' next to 'b'.
I thought that if I could rationalise the primary key then I could create
something around that.
As you say, that is probably hamfisted.
Appreciate it if you can point the way
lawrie Guest
-
CMBergin #6
Re: reset id
I'd set up a new column and set your sort order explicitly. Then you can do
whatever you want to it. :)
Example:
Insert a new item at position 6:
UPDATE Products
SET SortOrder = SortOrder + 1
WHERE SortOrder >= 6
INSERT INTO Products(Name, Description, Price, SortOrder)
VALUES('Pendant','Lorem ipsum dolor sit amet...',500.00,6)
Not exactly elegant, but at least manageable as long as there aren't new
products being added second by second.
"lawrie" <lawrie@nomailspamoranything.net> wrote in message
news:cv040h$pl6$1@forums.macromedia.com...change>
> "Michael Fesser" <netizen@gmx.net> wrote in message
> news:bhu611h9c492pp89dilp3eeb55qfjmiont@4ax.com...
> : .oO(lawrie)
> :
> : >I am using phpmyadmin with a mysql database.
> : >
> : >I have set the primary key ( a numerical value) to increase
> incrementally.
> : >
> : >After some time the range of id's become spread out.
> :
> : Nothing special.
> :
> : >Can the key be recalibrated back to 1,2,3......etc.
> :
> : Why?
> :
> : >I ask this as a client wants to reorder images and I am trying tocould> the
> : >CM to accomodate this. It would help if the id's were all within a
> : >managable range.
> :
> : Usually a primary key is written one time and then never touched again.
> : Why should it be necessary to rearrange the records? They are still in
> : order, even if some IDs are missing. If you have to recreate the primary
> : keys then IMHO there's something wrong.
>
> Yes, well I guess something is wrong.
> The client has two pages of jewellery products that are drawn from a
> database she manages.
> No problem. She uploads images & info from a simple admin I have set up.
> She now thinks, rightly, that if she creates a piece a pendant which
> complements some earrings then it would be good if this new piece 'p'> follow the existing piece 'e' in the gallery.
> I can order the products by date or id or ....but I cannot think of a way
> for her to get 'f' next to 'b'.
> I thought that if I could rationalise the primary key then I could create
> something around that.
> As you say, that is probably hamfisted.
> Appreciate it if you can point the way
>
>
CMBergin Guest
-
lawrie #7
Re: reset id
"CMBergin"wrote : I'd set up a new column and set your sort order
explicitly. Then you can do
: whatever you want to it. :)
:
: Example:
: Insert a new item at position 6:
:
: UPDATE Products
: SET SortOrder = SortOrder + 1
: WHERE SortOrder >= 6
:
: INSERT INTO Products(Name, Description, Price, SortOrder)
: VALUES('Pendant','Lorem ipsum dolor sit amet...',500.00,6)
:
: Not exactly elegant, but at least manageable as long as there aren't new
: products being added second by second.
Neat! :)
thanks
lawrie
lawrie Guest



Reply With Quote

