Search Results

Search found 4461 results on 179 pages for 'duplicate removal'.

Page 42/179 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • How to triage this MySQL duplicate entry error after running Rails migration?

    - by keruilin
    I get the following error when I try to run this migration: == AddUniquenessConstraintOnAwards: migrating ================================ -- add_index(:awards, [:badge_id, :game_week_id], {:unique=>true, :name=>:game_badge_index}) rake aborted! An error has occurred, all later migrations canceled: Mysql::Error: Duplicate entry '35-8192' for key 'game_badge_index': CREATE UNIQUE INDEX `game_badge_index` ON `awards` (`badge_id`, `game_week_id`) Has anyone encountered? What's the error telling me? How did you troubleshoot it and ultimately fix it?

    Read the article

  • How to handle duplicate symbol error from 3rd party libraries?

    - by brettr
    I have two 3rd party libraries that seem to use the same class. That should be fine but I'm getting this type of error when building: ld: duplicate symbol .objc_class_name_CJSONScanner in /Users/myappOne/TapjoyConnect/Frameworks/libTapjoyConnectSimulatorRewardInstall_Ads_Pinch.a(CJSONScanner.o) and /Developer/Projects/BuildOutput/Debug-iphonesimulator/OtherLibrary_d.a(CJSONScanner.o) How can I handle this issue?

    Read the article

  • How would I duplicate the Rank function in a Sql Server Compact Edition SELECT statement?

    - by AMissico
    It doesn't look like SQL Server Compact Edition supports the RANK() function. (See Functions (SQL Server Compact Edition) at http://msdn.microsoft.com/en-us/library/ms174077(SQL.90).aspx). How would I duplicate the RANK() function in a SQL Server Compact Edition SELECT statement. (Please use Northwind.sdf for any sample select statements, as it is the only one I can open with SQL Server 2005 Management Studio.)

    Read the article

  • Is there any pros to duplicate browser/keyboard functionality?

    - by metal-gear-solid
    Is it good for user experience to duplicate browser/keyboard functionality? For example: to provide these links on a web-page. "Back to top" link "Print this page" link "Add to Favorite" link "Back" button/link "Text zoom" button Are they really create Site's usability and accessibility? How screen reader will behave these links, will these confuse to screen reader users?

    Read the article

  • MYSQL Insert: How to save Query in the database only one time - duplicate key doesn't work!

    - by elmaso
    hello, I want to save a query only one time in the database, this is my code: $querystat = mysql_real_escape_string($_GET['q']); $datetime = time(); if( ($querystat != $_SESSION['prev_search']) OR ( ($datetime - $_SESSION['datetime']) > 60) ) { $insertquery = "INSERT INTO `query` ( `searchquery` , `datetime`) VALUES ( '$querystat' , '$datetime') ON DUPLICATE KEY UPDATE searchquery='$querystat';"; mysql_query($insertquery, $db); } maybe something with == 0 ?

    Read the article

  • INSERT ... ON DUPLICATE KEY UPDATE with WHERE?

    - by Raven
    Hi! I'm doing a INSERT ... ON DUPLICATE KEY UPDATE but I need the update part to be conditional, only doing the update if some extra condition has changed. However, WHERE is not allowed on this UPDATE. Is there any workaround for this? I can't do combinations of INSERT/UPDATE/SELECT since this needs to work over a replication.

    Read the article

  • insert contacts into database but does not want to duplicate already existing contact.

    - by Frank Nwoko
    I am trying to insert contacts into database but does not want to duplicate already existing contact. Not sure INSERT has WHERE CLAUSE. Any ideas? //Insert INTO contact database $user_id = userid; $sql_insert = "INSERT into `jt_members_external_contacts` (`j_user_id`,`contact_email`,`firstname` ) VALUES ('$user_id','$email','$name') WHERE j_user_id !=$user_id AND contact_email != $email;";

    Read the article

  • Where are TFS Alerts stored in the TFS Databases? Receiving duplicate alerts after upgrade 2008 to

    - by MJ Hufford
    I recently performed a migration-upgrade from TFS 2008 to TFS 2010. Almost everything is working properly now. However, our team is getting duplicate emails now. I'm guessing this is because I used the TFS 2008 power tools to setup alerts. After the upgrade, I installed the TFS 2010 power tools and noticed that there were not alerts configured. I setup new alerts and now we get duplicates. Is it possible the old alerts configuration is floating around in the db somewhere?

    Read the article

  • INSERT INTO ... SELECT FROM ... ON DUPLICATE KEY UPDATE

    - by dnagirl
    I'm doing an insert query where most of many columns would need to be updated to the new values if a unique key already existed. It goes something like this: INSERT INTO lee(exp_id, created_by, location, animal, starttime, endtime, entct, inact, inadur, inadist, smlct, smldur, smldist, larct, lardur, lardist, emptyct, emptydur) SELECT id, uid, t.location, t.animal, t.starttime, t.endtime, t.entct, t.inact, t.inadur, t.inadist, t.smlct, t.smldur, t.smldist, t.larct, t.lardur, t.lardist, t.emptyct, t.emptydur FROM tmp t WHERE uid=x ON DUPLICATE KEY UPDATE ...; //update all fields to values from SELECT, except for exp_id, created_by, location, animal, starttime, endtime I'm not sure what the syntax for the UPDATE clause should be. How do I refer to the current row from the SELECT clause?

    Read the article

  • Android: duplicate items in ListVew. Maybe getView() called too many times?

    - by gonzobrains
    Hi, I am trying to create a simple program which displays a "shopping cart" list of items, along with a few buttons below it to manage the cart. The biggest problem is that items are getting duplicate entries in the list view. That is, for every item I want to enter I see it appear two times in the list view. What's the problem? Also, the scrollable area of my cart is not big enough. How do I set it so that it is bigger but I can still see my buttons? Perhaps I should put the buttons above the cart? Here is my shopping cart's layout XML: Here is the layout for individual row items: <LinearLayout android:orientation="vertical" android:layout_width="0dip" android:layout_weight="1" android:layout_height="fill_parent"> <TextView android:id="@+id/BookTitle" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:singleLine="true" android:gravity="center_vertical" / <TextView android:id="@+id/BookPrice" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:singleLine="true" android:ellipsize="marquee" / Thanks, gb

    Read the article

  • MySQL: Is it faster to use inserts and updates instead of insert on duplicate key update?

    - by Nir
    I have a cron job that updates a large number of rows in a database. Some of the rows are new and therefore inserted and some are updates of existing ones and therefore update. I use insert on duplicate key update for the whole data and get it done in one call. But- I actually know which rows are new and which are updated so I can also do inserts and updates seperately. Will seperating the inserts and updates have advantage in terms of performance? What are the mechanics behind this ? Thanks!

    Read the article

  • How do I set up a test duplicate of a Django and Postgresql based web application?

    - by cojadate
    Not sure if this is an excessively broad and newbie-ish question for Stack Overflow but here goes: I paid someone else to build a web application for me and now I want to tweak certain aspects of it myself. I learn best by trial and error – changing stuff and seeing what happens. Obviously that's not a great way to treat a live site, so I need to duplicate the site on some kind of test server which I can play with without fear of the consequences. Unfortunately the closest I've come to programming has been creating ActionScript-based websites. I've never touched a database. So I really don't know where to start with setting up a test server. I would really appreciate any advice about where to start. I am completely ignorant and lost here. The web application is built in python/django using a Postgresql database. I use Mac OS X 10.6 if that makes any difference.

    Read the article

  • How can I share code across static libraries without duplicate symbol errors?

    - by Ben Flynn
    I am new to building static libraries and would like to create 2(+) libraries each of which has some unique code and some shared code. My intention is that other projects will link one or more of these static libraries. Util.h/m <-- Shared ImplOne.h/m <-- Unique to 'ImplOne' ImplTwo.h/m <-- Unique to 'ImplTwo' I am using XCode and generating the libraries by building Util.m and ImplOne.m in one case, and Util.m and ImplTwo.m in the other. Of course the issue is that I now cannot use these libraries together because they will have duplicate symbols. What is a better architecture for this situation?

    Read the article

  • Prevent duplicate rows with all non-unique columns (only with MySQL)?

    - by letseatfood
    Ho do I prevent a duplicate row from being created in a table with two columns, neither of which are unique? And can this be done using MySQL only, or does it require checks with my PHP script? Here is the CREATE query for the table in question (two other tables exist, users and roles): CREATE TABLE users_roles ( user_id INT(100) NOT NULL, role_id INT(100) NOT NULL, FOREIGN KEY (user_id) REFERENCES users(user_id), FOREIGN KEY (role_id) REFERENCES roles(role_id) ) ENGINE = INNODB; I would like the following query, if executed more than once, to throw an error: INSERT INTO users_roles (user_id, role_id) VALUES (1, 2); Please do not recommend bitmasks as an answer. Thanks!

    Read the article

  • C#, Fastest (Best?) Method of Identifying Duplicate Files in an Array of Directories

    - by Nate Greenwood
    I want to recurse several directories and find duplicate files between the n number of directories. My knee-jerk idea at this is to have a global hashtable or some other data structure to hold each file I find; then check each subsequent file to determine if it's in the "master" list of files. Obviously, I don't think this would be very efficient and the "there's got to be a better way!" keeps ringing in my brain. Any advice on a better way to handle this situation would be appreciated.

    Read the article

  • How can I remove a duplicate object from a MongoDB array?

    - by andrewrk
    My data looks like this: foo_list: [ { id: '98aa4987-d812-4aba-ac20-92d1079f87b2', name: 'Foo 1', slug: 'foo-1' }, { id: '98aa4987-d812-4aba-ac20-92d1079f87b2', name: 'Foo 1', slug: 'foo-1' } { id: '157569ec-abab-4bfb-b732-55e9c8f4a57d', name: 'Foo 3', slug: 'foo-3' } ] Where foo_list is a field in a model called Bar. Notice that the first and second objects in the array are complete duplicates. Aside from the obvious solution of switching to PostgresSQL, what MongoDB query can I run to remove duplicate entries from foo_list? Similar answers that do not quite cut it: http://stackoverflow.com/a/16907596/432 http://stackoverflow.com/a/18804460/432 These questions answer the question if the array had bare strings in it. However in my situation the array is filled with objects. I hope it is clear that I am not interested in a query; I want the duplicates to be gone from the database forever.

    Read the article

  • The way to send duplicate email to the user?

    - by Josephine
    I made simple email in wordpress but it would only send email to the administrator email. I need to find the way to send duplicate email with Thanks to the user. $emailTo = get_option('tz_email'); if (!isset($emailTo) || ($emailTo == '') ){ $emailTo = get_option('admin_email'); } $subject = 'I Have A Question to Ask from '.$name; $body = "Name: $name \n\nEmail: $email \n\nPhone: $phone \n\nComments: $comments"; $headers = 'From: '.$name.' ' . "\r\n" . 'Reply-To: ' . $email; wp_mail($emailTo, $subject, $body, $headers); $emailSent = true; } Insight is appreciated. Thank you.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >