Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 31st May 2009, 11:58
wrestleman wrestleman is offline
Member
 
Join Date: May 2009
P2P
Posts: 8
Default TBdev Small Problem
Trying to add some new input fields but it won't overwrite.

Click the image to open in full size.

SQL Error

Duplicate entry 'Testman' for key 2

PHP Code:
sql_query("INSERT INTO users (username, donated, donoruntil, vip_until) VALUES ($username$donated$donoruntil$vip_until)") or
            
sqlerr(__file____line__);
$res sql_query("SELECT id FROM users WHERE username=$username");
$arr mysql_fetch_row($res);
if (!
$arr)
stderr("Error!""Unable To Update Account.");
header("Location: $BASEURL/userdetails.php?id=$arr[0]");
die; 
Any ideas ?

Reply With Quote
  #2  
Old 31st May 2009, 14:07
pdq pdq is offline
TBDev BANNED Warrior
 
Join Date: Sep 2008
P2P
Posts: 46
Default
MySQL :: MySQL 5.0 Reference Manual :: 12.2.5.3 INSERT ... ON DUPLICATE KEY UPDATE Syntax
Reply With Quote
  #3  
Old 31st May 2009, 16:52
wrestleman wrestleman is offline
Member
 
Join Date: May 2009
P2P
Posts: 8
Default
phq, thanks that was it.

Had a little trouble at first, kept writing a new row but managed to sort it.

Reply With Quote
Reply

Tags
problem , small , tbdev

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with TBDEV Tracker - Torrents problem M4d4lyNn TBDev 0 15th January 2010 08:49
Small problem zimba BT.Manager (phpMyBitTorrent) 2 13th May 2009 17:27
2 small problems Mystic TBDev 3 8th March 2009 01:58
small things to rectify TSv5.1 anarky Template Shares 0 4th February 2009 15:12
TBDev problem zIoN TBDev 3 22nd December 2008 11:08



All times are GMT +2. The time now is 10:20. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.