INSERT INTO categories (cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (1, 'İbretlik Resimler', '', 0, 0, 10, 0, 0, 2, 2, 9, 0, 0, 0, 2);
INSERT INTO categories (cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (2, 'Çiçek Resimleri', '', 0, 3, 20, 0, 0, 2, 2, 9, 0, 0, 0, 2);
Yukardaki şekildeki sql kodun cat_id lerini nasıl öteleyebilirim.
Kategori ID lerini öteleme
3
●358
- 02-06-2009, 19:35:30
- 02-06-2009, 20:16:46ötelemekten kastınız nedir, otomatik artması mı ?
Eğer öyleyse veritabanında o alanı 'auto_increment' belirleyiniz. - 02-06-2009, 20:36:17cat_id si
şimdi 1 hepsinin üstüne +5 eklensin
1 olan 6
2 olan 7
3 olan 8 gibi
tabi mümkünse.. - 02-06-2009, 20:47:52"UPDATE categories SET cat_id = (cat_id + 5)"
tüm cat_id kayıtlarını 5 arttırır.
umarım işinizi görür.