•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 402,003 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,414 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 974 | Replies: 1
![]() |
•
•
Join Date: Jul 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
PHP version 5.1.6
MySQL version 5.0.27-standard-log
Table is super simple, 1 primary key, uid, unixtime(timestamp),blog, pro, bull, pix
Anyone see why this would give me two of the same record every time its executed? I have several other inserts sitewide that dont have the same problem. I have other queries on other pages that dont duplicate the entry but insert into the same table.
MySQL version 5.0.27-standard-log
Table is super simple, 1 primary key, uid, unixtime(timestamp),blog, pro, bull, pix
if($uid > 0 && $id != $uid){
include('connection.php');
mysql_query("INSERT INTO history SET uid='$uid', pro='$id'"); }
Thats all. Does anyone know why this would create two identical records every time? hi,
The query looks good. You might have problem with your code, the statements above
I dont think you have any problem with query. If you are still not satisfied with the query then try it out in MySQL console, executing the same SELECT statement, so that you can judge whether two records get inserted or one. You can do this as one of debug option.
kath.
•
•
•
•
Anyone see why this would give me two of the same record every time its executed?
if ($uid > 0 ... ). Probably a loop statement above it, check it thoroughly. I dont think you have any problem with query. If you are still not satisfied with the query then try it out in MySQL console, executing the same SELECT statement, so that you can judge whether two records get inserted or one. You can do this as one of debug option.
kath.
Last edited by katharnakh : Jul 31st, 2007 at 2:19 am.
challenge the limits
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- "Please insert disk into drive D:." (Windows NT / 2000 / XP / 2003)
- Please Help - Very Puzzling Display Issue (Monitors, Displays and Video Cards)
- Please insert disk into Drive D (Community Introductions)
- help with an assignement please (C++)
- please help with insertion sort (C++)
- Sending quotes to my database (PHP)
- How do you center the text in a JTextField?? (Java)
- Double Linked Lists and Functions required (C++)
Other Threads in the MySQL Forum
- Previous Thread: time to time data updates,to access that data time to time
- Next Thread: Wordpress, Joins and Indexes


Linear Mode