예제 #1
0
        static private long InsertCollectionInDb(string name)
        {
            string sql = "INSERT IGNORE INTO "
                         + "collection(collectionName)"
                         + "VALUES(@one)";

            long id = DBconnection.ExecuteInsertReturnId(sql, name);

            return(id);
        }
예제 #2
0
파일: Link.cs 프로젝트: samuraicodes/Wen
        static private long InsertLinkInDb(string name, string url, string description, int collection, int categorie)
        {
            string sql = "INSERT IGNORE INTO "
                         + "link(linkName, linkUrl, linkDescription, linkCollectionFk, linkCategorieFk)"
                         + "VALUES(@one, @two, @three, @four, @five)";

            long id = DBconnection.ExecuteInsertReturnId(sql, name, url, description, collection, categorie);

            return(id);
        }