avoid entering duplicate records through procedure


Hi



I want to insert the record into a table after checking that the record is not available in the table.

below is the code:-

CREATE PROCEDURE newprcSaveGPSLocation(
_lat VARCHAR(45),
_lng VARCHAR(45),
_mph VARCHAR(45),
_direction VARCHAR(45),
_distance VARCHAR(45),
_date VARCHAR(100),
_locationMethod VARCHAR(100),
_phoneNumber VARCHAR(20),
_sessionID VARCHAR(50),
_accuracy VARCHAR(20),
_locationIsValid VARCHAR(5),
_extraInfo VARCHAR(255),
_recid VARCHAR(25)
)
BEGIN
DECLARE l_count INTEGER;
select count(*) into l_count from locations where record_id ='_recid';

IF l_count
Posted On: Thursday 25th of October 2012 10:03:09 PM Total Views:  109
View Complete with Replies

RELATED TOPICS OF MYSQL PROGRAMMING LANGUAGE




Commas within fields cause empty field entering

I have no idea why this is happening. Here is my query, all fields insert fine except for the field highlighted as bold. If I remove the commas from that field it inserts properly, otherwise it goes in blank. The field type for that field is set to text (just to make sure that it was not an integer problem or anything). Any ideas Quote: insert into properties values ("17 - 21 Liverpool Road North, Maghull, Liverpool","2","The premises provide a two storey brick built premises within a well established parade of mixed retail and office neighbourhood occupiers.","","","","17 - 21","Liverpool Road North","","Maghull","Liverpool","","L31 2HB","Merseyside","Sefton","COMPLETED","0","427","1465","1465","SqFt","39.67","136.1","136.1","SqM","12 APR 2006 11:34","Retail / Leisure","","","Leasehold"," 7,000- 22,000","per annum","","","","","","Full Repairing Lease","The ingoing tenant is to be responsible for the Landlord's reasonable legal costs incurred in this transaction.","The units are available subject to a minimum term of 3 years. Unit 1 : 8,000 per annum Unit 2 : 7,000 per annum Unit 3 : 7,000 per annum Alternatively, the premises may be occupied as a whole or in part. adjoining units' rentals to be agreed.","Prominent roadside main arterial route","Retail consent","Office and other uses will be considered subject to gaining the usual planning consents","Units available as a whole or in single units","Total Ground Floor Area 136 sq.m. (1,465 sq.ft.)","","","","","","TO LET LIVERPOOL 17-21 Liverpool Road North, Maghull L31 2HB GROUND FLOOR RETAIL UNITS","2.jpg","","","","3.jpg","MW","Mark Worthington","" )
VIEWS ON THIS POST

57

Posted on:

Friday 12th October 2012
View Replies!

Page 2 - Any way to avoid using temp table?

Quote: Originally Posted by Elessar It is now saying that it uses the index for table "p" (tls206_person), but it isn't using the index appln_ix_id_fildate_auth for "a" (tls201_appln). It uses the primary key as you can see in the explain from my last reply. What could be the problem Hmm that's odd, have you tried ANALYZE TABLE ... so that MySQL doesn't think that your table is really small Quote: Originally Posted by Elessar Then I have noticed something when trying to run the queries with SQL_NO_CACHE activated. The first time I run the query it's taking several minutes, the second it takes a lot less time and the third time it's done in a few seconds. I can then change the time interval and have the same execution time, but when I change the country the query is much slower again. If I change back to a query for a country I have run before it executes in an intermediate time. And when I run the same query again it's back to be executed in a few seconds. What is the reason the server behaves like this Normal caching, which is why it's really hard to get repeatable values during performance optimizations. Caching happens on a lot of levels within a computer to speed it up and depending on which information you have available on each level the performance of the query can differ a lot. Caching is present in your harddrive (pretty small 16-32MB), OS File Cache (pretty large, basically all unused memory is used for this). Index Cache within MySQL (since you are using MyISAM, with InnoDB you cache both index and data within MySQL). And if you have query cache enabled then that's an additional level.
VIEWS ON THIS POST

79

Posted on:

Friday 12th October 2012
View Replies!

Should I lock tables to avoid this race condition?

On my website, I have an area where I display the latest news and allow people to respond. I want to add the ability to have people respond to anyone else's responses, thus creating a whole tree hierarchy of responses. I want to be able to get the whole tree in one sql statement like you could do with Oracle's "starting with/connect by" combo. So to do that I use the modified preorder tree traversal method explained here . It works just fine and I can get then get all responses, responses to those response, all the way down the line without having to recursively query the tree if not for this method. There's a race condition issue, however. If someone wants to respond to someone else's response, I do a select to get the necessary data regarding what post they're responding to, then use the results of that to do two updates. In between the select and the update, someone else could respond to the same response. Basically, a race condition could arise where one person's response gets clubbed over. I'm not sure how well I explained this, but was wondering how to get around this race condition. I was thinking of locking the tables until I finish the select and update. Anybody have any experience with this My concern is that anybody who just comes to the page might not get it right away as someone might be responding to a post. So there will be a lock on that table until they've finished responding. It will probably take less than a second, but I don't know.
VIEWS ON THIS POST

71

Posted on:

Friday 12th October 2012
View Replies!

avoid zero in interger datatype

Is there any way to avoid zeros which automatically entered in database in those column those have integer data type. or i want to enter - instead of those zero
VIEWS ON THIS POST

84

Posted on:

Sunday 21st October 2012
View Replies!

Making a mistake when entering mysql command

Just wondering I'm going through the book "build your own database driven website using mysql and php. While I was typing in a joke to enter into the database I messed up and don't know how to fix it Code: mysql>INSERT INTO joke SET ->joketext = "This is the joke I was entering", ->jokedate = 2004-03- 02"; ->; ->\c; ->/c; As you can see I tried to get out of it but didn't know what to use so I just closed the command promp screen and began again. There has to be a better way.
VIEWS ON THIS POST

88

Posted on:

Sunday 21st October 2012
View Replies!

Order by field, which lists duplicate value?

The following sql returns the 'tid' and 'pos' for only 4 out of the 5 passed in words - it misses out the duplicate OR between password and about: email OR password about What I actually want is it to return all 5 words in the same order as given to the sort by field function, so... email OR password OR about Does anyone know how you write this properly so that ALL 5 words are returned with their 'tid' and 'pos' Including the duplicate OR word which seems to get ignored\t
VIEWS ON THIS POST

127

Posted on:

Wednesday 24th October 2012
View Replies!

MySQL Query problem (duplicate results)

there Im having a problem finding duplicate results in a mysql database (a cocktail recipe website). Here the setup: Table 1: 'cocktail' [cid,c_name] (cid = unique cocktail id, c_name = cocktail name) Table 2: 'ingredients': [iid,i_name] (iid = unique ingredient id, i_name = ingredient name) Table 3: 'cocktail_ingredients' (the linking table) [ciid,cid,iid] (ciid = unique row identifier, cid = cocktail cid, iid = ingredient iid) So one cocktail can have multiple rows in the 'cocktail_ingredients' table (1 to many). Setup is fine. The problem Im having now is finding if there are duplicate cocktails in my database. For instance if the cocktail_ingredients table had these entries: cid | iid 1 | 56 1 | 78 1 | 101 . . . 9 | 56 9 | 78 9 | 101 The cocktail is the same (for theoretical purposes here anyway). If the 'cocktail_ingredients' table had one more row ... 9 | 103 Then it wouldn't be the same, as cocktail number 9 includes an extra ingredient. So the mysql has to do 2 checks, firstly that the ingredient count is the same, and secondly that every ingredient id (iid) is the same for corresponding cocktails (cid). Im stumped on this one, any help much appreciated. I'm thinking I might have to head down the PHP route as well to code in something more complex, but I'm struggling there as well so thought this would be a good place to stop and ask.
VIEWS ON THIS POST

264

Posted on:

Wednesday 24th October 2012
View Replies!

Joining table to itself: Avoiding duplicate column combinations

, I'm trying to avoid duplicate column combinations when joining a table to itself. For example, say may table looks like so: Code: name | coolness --------------- John | 5 Jenn | 8 Dave | 8 Rexy | 3 If I do the following query: Code: SELECT a.name as name1, b.name as name2 FROM tName as a INNER JOIN tName as b ON a.coolness = b.coolness WHERE a.name != b.name I get the following results: Code: name1 | name2 -------------- Jenn | Dave Dave | Jenn These 2 returned rows do not present distinct column combinations. How can I modify my query to get distinct combinations of the two columns (i.e. only one row would be returned in the example above, as such: Code: name1 | name2 -------------- Jenn | Dave
VIEWS ON THIS POST

106

Posted on:

Wednesday 24th October 2012
View Replies!

How can I allow for duplicate ids in the primary key field

I have items that are being put in to my database. I can enter one item but then when I want to enter a new item I get a duplicate key error. The reason I need to have the same id for items is that the items correspond to clients and each client has different items. I thought I had this set up correctly but setting both of the fields in the DB table to be the primary keys but that is not working. Basically this is what my DB needs to look like. soq_references_id-------bullet ----------------1-------bullet 1 ----------------1-------bullet 2 ----------------1-------bullet 3 It will continue down the line with the different ids. The Ids are coming from a table called soq_references, so each soq_references_id relates to a clietns ID and puts the bullets under the right client. Cliff notes: I need to know how to allow for duplicate soq_references_id's. if you need more information please ask, thank you in advance for the help. , 9-bullet is just saying the id is "9" and the text being put in is "bullet". Im using CRUD so that's how it displays it.
VIEWS ON THIS POST

164

Posted on:

Wednesday 24th October 2012
View Replies!

Would like to avoid iterating through data and UPDATING multiple times

I've got product data that belongs to a category table. The business requirement is for the user to be allowed to update the order in which products appear in that category. There is a field called product.sequence for that very purpose. I'm being given the product id's in order for each category. Do I have to iterate through the data in PHP and UPDATE the table w/ many SQL statements, or is there one SQL statement where I can provide the list of products to update in order I've used MySQL user variables before (e.g. SELECT @m:=0; ) but I don't see how I can use it here... Is what I want possible in one query I hope I explained this clearly.
VIEWS ON THIS POST

133

Posted on:

Wednesday 24th October 2012
View Replies!

How to prevent duplicate entries

Hi I how can I prevent duplicate enteries in mysql database. I set slim browser to auto refresh every second, as I was hit n trying codes, learning my myself from online sites. suddenly i saw in phpmyadmin theat there were 44 duplicate entries already. Ho can i make an error appear if similar entry exists. PHP Code: PHP Code:
VIEWS ON THIS POST

119

Posted on:

Wednesday 24th October 2012
View Replies!

Selecting duplicate rows - Please HELP!

I have a 3 column table: ID - unique key autoincrement field Name - varchar 50 Description - varchar 100 What I need to do is select and display all the duplicate rows based on the name field. I've seen how to do a count of the dupes, but can't figure out how to display all the dupes. The output should be something like this: ID Name Desc 1 Tom dept1 2 Tom dept22 7 Tom dept17 9 Dave dept11 10 Dave dept3 and so on. Can anyone please help a newbie with this suggestions are greatly appreciated!
VIEWS ON THIS POST

104

Posted on:

Wednesday 24th October 2012
View Replies!

Returning duplicate rows based on a column value

I've got some data that looks like this: id, name, count 1, dave, 2 2, bill, 4 3, ted, 2 I need a select that returns: dave dave bill bill bill bill ted ted Can I do this in mysql I'm assuming I'd join a table to itself, but I don't know exactly how to return more rows than the original.
VIEWS ON THIS POST

111

Posted on:

Wednesday 24th October 2012
View Replies!

Concatenate multiple rows into a set list(no duplicates) based on unique ID

all; Any help, directions, or thoughts on this is much apprecaited. Let's say I have the following table: Code: ID Value 1 a 1 a 1 b 2 c 2 a 3 a 3 c 3 b Is there a quick way in MySQL that will let me build a new table so that it is now represented where the ValueCombination is sorted such as: Code: ID ValueCombination 1 a 2 a,c 3 a,b,c After this is done can I build a table from this tabel for the counts associated to the Values in the ValueCombination field such as: Code: Value Count a 3 b 1 c 2 After this I would like to build a table again from the ValueCombination table to count the instances of the ValueCombination such as: Code: ValueCombination Count a 1 a,b,c 1 a,c 1 As mentioned any suggestions are much appreciated. Celeste.
VIEWS ON THIS POST

115

Posted on:

Wednesday 24th October 2012
View Replies!

Identifying duplicate rows across mulitple tables

Several large tables linked by a common ID contain duplicate rows (across all tables). Is there a way to identify these rows with a SELECT query t1 id val 1 3.4 2 4.4 3 4.4 t2 id val 1 1.1 2 10.3 3 10.3 SELECT t1.id FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE (\t) Would return id 2 3
VIEWS ON THIS POST

100

Posted on:

Wednesday 24th October 2012
View Replies!

Duplicate records - how to not show duplicates?

I have a MYSQL Table which has many e-mail address duplicates. When our programmer did a newsletter function, he didn't add anything to check to see if they were already added. So, ultimately, what we have now, is a newsletter database of peoples e-mail addresses, of which there are many people in there more than once. What is a MYSQL string that we can run that will basically take all of the e-mail addresses in this table, and give us the output of just one (it won't show the duplicates). I would rather keep the duplicates where they are (they show another date that they joined the newsletter), but for our mailing list, I don't want the duplicate e-mail addresses in our mailing list. Any suggestions
VIEWS ON THIS POST

136

Posted on:

Wednesday 24th October 2012
View Replies!

Impossible duplicate...

, i have a very strange case; when i submit the following query Code: select id from text_tmp limit 25; my result is : Code: +----+ | id | +----+ | 1 | | 2 | | 4 | | 5 | | 6 | | 7 | | 8 | | 10 | | 11 | | 13 | | 15 | | 16 | | 17 | | 18 | | 20 | | 21 | | 23 | | 24 | | 25 | | 26 | | 27 | | 28 | | 30 | | 31 | | 32 | +----+ therefore, id 22 (and a few more) is missing... and when i ask for : Code: UPDATE text_tmp SET id='21', place=((text_tmp.original_id % 5) +1), round=round-1, occupied='no' WHERE occupied='yes' ORDER BY id DESC LIMIT 1; it returns me Code: DBD::mysql::db do failed: Duplicate entry '22' for key 1 .... how come p.s.: meanwhile i'm googling for help on the issue but the last 2 hours haven't brought be any info yet in my needs.
VIEWS ON THIS POST

127

Posted on:

Wednesday 24th October 2012
View Replies!

Finding duplicates that also do not match ! Almost duplicates

Guys. I have been using MySQL for a couple of years but am truly stuck with this one and would appreciate anyone's help. I am searching a large database of almost 1 million records so the statement needs to be as short as possible. In 1 table I am searching through 4 columns 3 of them need to match (duplicates) and one of them must be different. Vendor Name Invoice No Invoice Date Invoice Amount Boots The Chemist 001 01/01/07 10,000 Boots 001 01/01/07 10,000 Boots The Chemist 001 01/01/07 10,000 Boots The Chemist 001 01/01/07 10,000 So I need to do a search that would point out the above selection because the last 3 columns match and the Vendor Names do not match. But if all four columns match (duplicates) I need to ignore. Vendor Name Invoice No Invoice Date Invoice Amount WH Smiths 001 01/01/07 5,000 WH Smiths 001 01/01/07 5,000 WH Smiths 001 01/01/07 5,000 So the key is to display where the last 3 columns match and the first column does not match. So far, I have this bit it could be completely wrong: mysql = "SELECT * FROM (SELECT *, COUNT(*) AS Duplicates FROM tblMain GROUP BY InvAmo, InvNum, InvDate HAVING COUNT(*) > 1) a1 " &_ "GROUP BY VendName HAVING COUNT(VendName) < Duplicates" The nested select statement finds all duplicates for the last 3 fields and the outer select statement should then group by the Vendor Name and see if there are any difference but obviously it is not working... Many
VIEWS ON THIS POST

117

Posted on:

Wednesday 24th October 2012
View Replies!

Make fieldB unique if fieldA is duplicate

I'm sure that there is a way to do this thru SQL, but my inexperienced toying is not producing results. The way my client wants the record id's to look is 200609220643001 (200609220643 = year, month, date, hour, minute... generated in the PHP submit and stored in fieldA) + (001 = unique id generated if fieldA if duplicate). Currently fieldA is a varChar and fieldB is a tinyInt with unsigned_zerofill/auto_increment... but I don't really want fieldB to auto_increment unless fieldA is a duplicate. I've checked out this link with no luck: example-auto-increment. Whenever I used the settings described I would get errors. I'm using MySQL v.4.1.21, and phpmyadmin v.2.8.0.2. Any ideas on the appropriate table setup to do this, or will I have to write a PHP function to check for duplicates
VIEWS ON THIS POST

98

Posted on:

Wednesday 24th October 2012
View Replies!

On duplicate key Update did not work

Hi.. I encountered problem in using on duplicate key update.. here is my query: Code: INSERT INTO parameter_settings (P27, P27_max, P27LOT_max, P27_maxdoz, P27Doz_max, P27_min, P27LOT_min, P27_mindoz, P27Doz_min, P28, P28_max, P28LOT_max, P28_maxdoz, P28Doz_max, P28_min, P28LOT_min, P28_mindoz, P28Doz_min, P30, P30_max, P30LOT_max, P30_maxdoz, P30Doz_max, P30_min, P30LOT_min, P30_mindoz, P30Doz_min, P32, P32_max, P32LOT_max, P32_maxdoz, P32Doz_max, P32_min, P32LOT_min, P32_mindoz, P32Doz_min, P32W, P32W_max, P32WLOT_max, P32W_maxdoz, P32WDoz_max, P32W_min, P32WLOT_min, P32W_mindoz, P32WDoz_min, P33, P33_max, P33LOT_max, P33_maxdoz, P33Doz_max, P33_min, P33LOT_min, P33_mindoz, P33Doz_min, P35, P35_max, P35LOT_max, P35_maxdoz, P35Doz_max, P35_min, P35LOT_min, P35_mindoz, P35Doz_min, P35M, P35M_max, P35MLOT_max, P35M_maxdoz, P35MDoz_max, P35M_min, P35MLOT_min, P35M_mindoz, P35MDoz_min, P35W, P35W_max, P35WLOT_max, P35W_maxdoz, P35WDoz_max, P35W_min, P35WLOT_min, P35W_mindoz, P35WDoz_min, P38, P38_max, P38LOT_max, P38_maxdoz, P38Doz_max, P38_min, P38LOT_min, P38_mindoz, P38Doz_min, P41, P41_max, P41LOT_max, P41_maxdoz, P41Doz_max, P41_min, P41LOT_min, P41_mindoz, P41Doz_min, P42, P42_max, P42LOT_max, P42_maxdoz, P42Doz_max, P42_min, P42LOT_min, P42_mindoz, P42Doz_min, P43, P43_max, P43LOT_max, P43_maxdoz, P43Doz_max, P43_min, P43LOT_min, P43_mindoz, P43Doz_min, P45, P45_max, P45LOT_max, P45_maxdoz, P45Doz_max, P45_min, P45LOT_min, P45_mindoz, P45Doz_min, P46, P46_max, P46LOT_max, P46_maxdoz, P46Doz_max, P46_min, P46LOT_min, P46_mindoz, P46Doz_min, P47, P47_max, P47LOT_max, P47_maxdoz, P47Doz_max, P47_min, P47LOT_min, P47_mindoz, P47Doz_min, Total, Total_max, TotalLOT_max, Total_maxdoz, TotalDoz_max, Total_min, TotalLOT_min, Total_mindoz, TotalDoz_min ) VALUES ('$P27', '$P27_max', '$P27LOT_max', '$P27_maxdoz', '$P27Doz_max', '$P27_min', '$P27LOT_min', '$P27_mindoz', '$P27Doz_min', '$P28', '$P28_max', '$P28LOT_max', '$P28_maxdoz', '$P28Doz_max', '$P28_min', '$P28LOT_min', '$P28_mindoz', '$P28Doz_min', '$P30', '$P30_max', '$P30LOT_max', '$P30_maxdoz', '$P30Doz_max', '$P30_min', '$P30LOT_min', '$P30_mindoz', '$P30Doz_min', '$P32', '$P32_max', '$P32LOT_max', '$P32_maxdoz', '$P32Doz_max', '$P32_min', '$P32LOT_min', '$P32_mindoz', '$P32Doz_min', '$P32W', '$P32W_max', '$P32WLOT_max', '$P32W_maxdoz', '$P32WDoz_max', '$P32W_min', '$P32WLOT_min', '$P32W_mindoz', '$P32WDoz_min', '$P33', '$P33_max', '$P33LOT_max', '$P33_maxdoz', '$P33Doz_max', '$P33_min', '$P33LOT_min', '$P33_mindoz', '$P33Doz_min', '$P35', '$P35_max', '$P35LOT_max', '$P35_maxdoz', '$P35Doz_max', '$P35_min', '$P35LOT_min', '$P35_mindoz', '$P35Doz_min', '$P35M', '$P35M_max', '$P35MLOT_max', '$P35M_maxdoz', '$P35MDoz_max', '$P35M_min', '$P35MLOT_min', '$P35M_mindoz', '$P35MDoz_min', '$P35W', '$P35W_max', '$P35WLOT_max', '$P35W_maxdoz', '$P35WDoz_max', '$P35W_min', '$P35WLOT_min', '$P35W_mindoz', '$P35WDoz_min', '$P38', '$P38_max', '$P38LOT_max', '$P38_maxdoz', '$P38Doz_max', '$P38_min', '$P38LOT_min', '$P38_mindoz', '$P38Doz_min', '$P41', '$P41_max', '$P41LOT_max', '$P41_maxdoz', '$P41Doz_max', '$P41_min', '$P41LOT_min', '$P41_mindoz', '$P41Doz_min', '$P42', '$P42_max', '$P42LOT_max', '$P42_maxdoz', '$P42Doz_max', '$P42_min', '$P42LOT_min', '$P42_mindoz', '$P42Doz_min', '$P43', '$P43_max', '$P43LOT_max', '$P43_maxdoz', '$P43Doz_max', '$P43_min', '$P43LOT_min', '$P43_mindoz', '$P43Doz_min', '$P45', '$P45_max', '$P45LOT_max', '$P45_maxdoz', '$P45Doz_max', '$P45_min', '$P45LOT_min', '$P45_mindoz', '$P45Doz_min', '$P46', '$P46_max', '$P46LOT_max', '$P46_maxdoz', '$P46Doz_max', '$P46_min', '$P46LOT_min', '$P46_mindoz', '$P46Doz_min', '$P47', '$P47_max', '$P47LOT_max', '$P47_maxdoz', '$P47Doz_max', '$P47_min', '$P47LOT_min', '$P47_mindoz', '$P47Doz_min', '$Total', '$Total_max', '$TotalLOT_max', '$Total_maxdoz', '$TotalDoz_max', '$Total_min', '$TotalLOT_min', '$Total_mindoz', '$TotalDoz_min' ) ON DUPLICATE KEY UPDATE P27 = '$P27', P27_max = '$P27_max', P27LOT_max = '$P27LOT_max', P27_maxdoz = '$P27_maxdoz', P27Doz_max = '$P27Doz_max', P27_min = '$P27_min', P27LOT_min = '$P27LOT_min', P27_mindoz = '$P27_mindoz', P27Doz_min = '$P27Doz_min', P28 = '$P28', P28_max = '$P28_max', P28LOT_max = '$P28LOT_max', P28_maxdoz = '$P28_maxdoz', P28Doz_max = '$P28Doz_max', P28_min = '$P28_min', P28LOT_min = '$P28LOT_min', P28_mindoz = '$P28_mindoz', P28Doz_min = '$P28Doz_min', P30 = '$P30', P30_max = '$P30_max', P30LOT_max = '$P30LOT_max', P30_maxdoz = '$P30_maxdoz', P30Doz_max = '$P30Doz_max', P30_min = '$P30_min', P30LOT_min = '$P30LOT_min', P30_mindoz = '$P30_mindoz', P30Doz_min = '$P30Doz_min', P32 = '$P32', P32_max = '$P32_max', P32LOT_max = '$P32LOT_max', P32_maxdoz = '$P32_maxdoz', P32Doz_max = '$P32Doz_max', P32_min = '$P32_min', P32LOT_min = '$P32LOT_min', P32_mindoz = '$P32_mindoz', P32Doz_min = '$P32Doz_min', P32W = '$P32W', P32W_max = '$P32W_max', P32WLOT_max = '$P32WLOT_max', P32W_maxdoz = '$P32W_maxdoz', P32WDoz_max = '$P32WDoz_max', P32W_min = '$P32W_min', P32WLOT_min = '$P32WLOT_min', P32W_mindoz = '$P32W_mindoz', P32WDoz_min = '$P32WDoz_min', P33 = '$P33', P33_max = '$P33_max', P33LOT_max = '$P33LOT_max', P33_maxdoz = '$P33_maxdoz', P33Doz_max = '$P33Doz_max', P33_min = '$P33_min', P33LOT_min = '$P33LOT_min', P33_mindoz = '$P33_mindoz', P33Doz_min = '$P33Doz_min', P35 = '$P35', P35_max = '$P35_max', P35LOT_max = '$P35LOT_max', P35_maxdoz = '$P35_maxdoz', P35Doz_max = '$P35Doz_max', P35_min = '$P35_min', P35LOT_min = '$P35LOT_min', P35_mindoz = '$P35_mindoz', P35Doz_min = '$P35Doz_min', P35M = '$P35M', P35M_max = '$P35M_max', P35MLOT_max = '$P35MLOT_max', P35M_maxdoz = '$P35M_maxdoz', P35MDoz_max = '$P35MDoz_max', P35M_min = '$P35M_min', P35MLOT_min = '$P35MLOT_min', P35M_mindoz = '$P35M_mindoz', P35MDoz_min = '$P35MDoz_min', P35W = '$P35W', P35W_max = '$P35W_max', P35WLOT_max = '$P35WLOT_max', P35W_maxdoz = '$P35W_maxdoz', P35WDoz_max = '$P35WDoz_max', P35W_min = '$P35W_min', P35WLOT_min = '$P35WLOT_min', P35W_mindoz = '$P35W_mindoz', P35WDoz_min = '$P35WDoz_min', P38 = '$P38', P38_max = '$P38_max', P38LOT_max = '$P38LOT_max', P38_maxdoz = '$P38_maxdoz', P38Doz_max = '$P38Doz_max', P38_min = '$P38_min', P38LOT_min = '$P38LOT_min', P38_mindoz = '$P38_mindoz', P38Doz_min = '$P38Doz_min', P41 = '$P41', P41_max = '$P41_max', P41LOT_max = '$P41LOT_max', P41_maxdoz = '$P41_maxdoz', P41Doz_max = '$P41Doz_max', P41_min = '$P41_min', P41LOT_min = '$P41LOT_min', P41_mindoz = '$P41_mindoz', P41Doz_min = '$P41Doz_min', P42 = '$P42', P42_max = '$P42_max', P42LOT_max = '$P42LOT_max', P42_maxdoz = '$P42_maxdoz', P42Doz_max = '$P42Doz_max', P42_min = '$P42_min', P42LOT_min = '$P42LOT_min', P42_mindoz = '$P42_mindoz', P42Doz_min = '$P42Doz_min', P43 = '$P43', P43_max = '$P43_max', P43LOT_max = '$P43LOT_max', P43_maxdoz = '$P43_maxdoz', P43Doz_max = '$P43Doz_max', P43_min = '$P43_min', P43LOT_min = '$P43LOT_min', P43_mindoz = '$P43_mindoz', P43Doz_min = '$P43Doz_min', P45 = '$P45', P45_max = '$P45_max', P45LOT_max = '$P45LOT_max', P45_maxdoz = '$P45_maxdoz', P45Doz_max = '$P45Doz_max', P45_min = '$P45_min', P45LOT_min = '$P45LOT_min', P45_mindoz = '$P45_mindoz', P45Doz_min = '$P45Doz_min', P46 = '$P46', P46_max = '$P46_max', P46LOT_max = '$P46LOT_max', P46_maxdoz = '$P46_maxdoz', P46Doz_max = '$P46Doz_max', P46_min = '$P46_min', P46LOT_min = '$P46LOT_min', P46_mindoz = '$P46_mindoz', P46Doz_min = '$P46Doz_min', P47 = '$P47', P47_max = '$P47_max', P47LOT_max = '$P47LOT_max', P47_maxdoz = '$P47_maxdoz', P47Doz_max = '$P47Doz_max', P47_min = '$P47_min', P47LOT_min = '$P47LOT_min', P47_mindoz = '$P47_mindoz', P47Doz_min = '$P47Doz_min', Total = '$Total', Total_max = '$Total_max', TotalLOT_max = '$TotalLOT_max', Total_maxdoz = '$Total_maxdoz', TotalDoz_max = '$TotalDoz_max', Total_min = '$Total_min', TotalLOT_min = '$TotalLOT_min', Total_mindoz = '$Total_mindoz', TotalDoz_min = '$TotalDoz_min' I want to happen is only one row will add in my database and if I need to edit my data It will update the data that already been save. But in my code instead of updating my data in my database, it will insert or again in another row. I cant figure out whats wrong or missing in my query syntax. Thank you Thank you
VIEWS ON THIS POST

345

Posted on:

Thursday 25th October 2012
View Replies!