• 02-06-2009, 19:35:30
    #1
    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.
  • 02-06-2009, 20:16:46
    #2
    ötelemekten kastınız nedir, otomatik artması mı ?
    Eğer öyleyse veritabanında o alanı 'auto_increment' belirleyiniz.
  • 02-06-2009, 20:36:17
    #3
    cat_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
    #4
    "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.