![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
Editing an mySQL database without a primary key?
How can I easily change the one of values in a table wihout a primary key?
*nix running MySQL 3.23.58
__________________
Amen |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jun 2002
Location: austin, tx
Posts: 1,911
|
you need to be very verbose in your update such that you have enough where clauses to make a discreet data set. Make sense?
__________________
http://www.flickr.com/photos/zoddler/ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Apr 2002
Location: Virgin - nee
Posts: 3,162
|
For one row or all rows?
If for all rows, are the values you want to change currently all the same or are they all something different? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | ||
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
Quote:
dir listings have pretty colors. Quote:
__________________
Amen |
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
♥♥♥ Likes Hugs ♥♥♥
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
|
why would the primary key matter?
UPDATE TABLE SET column='value' WHERE column='value'
__________________
I like pie. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
Quote:
__________________
Amen |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Oct 2003
Posts: 3,888
|
It's real easy to do in PHPMYSQL.
__________________
![]() xxxoutsourcing.com ICQ:119936 | Aim:xxxoutsourcing | MSN:msn@ xxxoutsourcing.com | Yahoo:xxxoutsourcing Submitters, Designers, Programmers, Cartoonist, Creative Writers, Video & Photo Editors Convert your Paysite into a cartoon site convert2toons.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Apr 2002
Location: Virgin - nee
Posts: 3,162
|
Quote:
JC if you're not coding something and you just want to fiddle with a table, try downloading PHPMyAdmin. It's free and it's really easy to use. Google for it. It will lay out the database like a spreadsheet so it's easy to look at, and you can directly edit the values for whichever row you want (just click the 'edit' link at the end of that particular row). |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
So Fucking Banned
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
|
Quote:
UPDATE table SET this_col='' WHERE col_one='' AND col_two=''; ps: http://www.phpmyadmin.net/ |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
I've alread ytryed phpmyadmin. It just gives an SQL error whe nI try to edit the contents. Im trying to "hack" (basically append) somthing to a scripts copyrite message. I guess its somehow protected after the databse is initally created.
__________________
Amen |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
♥♥♥ Likes Hugs ♥♥♥
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
|
Quote:
__________________
I like pie. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Industry Role:
Join Date: Feb 2003
Location: Australia
Posts: 9,492
|
get out of SQL, in unix type in: rm -r
& and that should do the trick ![]()
__________________
![]() Blue Design Studios - Adult Design Specialists! Email me for a free quote: [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Apr 2002
Location: Virgin - nee
Posts: 3,162
|
Nah, it's not protected. You're probably just using the wrong box to do what you're trying to do or you've got magic quotes turned on or something so that PHPMyAdmin has a problem interpreting things.
Don't use the big SQL box where you can type commands. Instead, Browse the table, go to the row you want to change, and hit the 'Edit' link. When you 'append' your information, don't use apostrophes or quote marks. Alternatively, just look in the code itself and where it calls the value for the copyright message, add your HTML afterwards. (Once the PHP code is done and it goes back into normal html.) Dang this is hard to explain to a non-coder. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
Quote:
?? Whats it doing?
__________________
Amen |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Join Date: Dec 2003
Location: Toronto
Posts: 285
|
the problem you probably have is that if 2 rows have the same value it would give you an error since it needs a unique identifier to update/delete. had run in that problem myself couple of times using MS SQL when i am editing the data using the GUI.. i don't know if it's the same with MySql but when I just lauch the query from a script it goes trough. a good way to find a solution is to google the error you get or post it here it might help.
__________________
Custom large/complex systems programing.<br>ASP.Net, C#, XML, MS SQL, WebServices(SOAP).<br>ICQ: 235719545 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 | |
Confirmed User
Join Date: Apr 2002
Location: Virgin - nee
Posts: 3,162
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
Confirmed User
Join Date: Dec 2003
Location: Toronto
Posts: 285
|
Quote:
![]()
__________________
Custom large/complex systems programing.<br>ASP.Net, C#, XML, MS SQL, WebServices(SOAP).<br>ICQ: 235719545 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 | |
♥♥♥ Likes Hugs ♥♥♥
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
|
Quote:
![]()
__________________
I like pie. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 | |
Confirmed User
Join Date: Jun 2002
Location: austin, tx
Posts: 1,911
|
Quote:
no cli? jesus typed man, no clicky of the mouse for him. you fuckimg imposter!
__________________
http://www.flickr.com/photos/zoddler/ |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
I get this error.... right when I click edit.... (THis is BEFORE I have the chance to modify anything)
"There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem ERROR: Unclosed quote @ 342" Blach Fuck it... I'll jsut go hunt down the section of the PHP code the deals with this table an just set and absolute variable in the code and run it. I would have done that in the first place but its a huge piece of software and I figure Id try it like this first.... Thanks anyway. BTW SHould I have an EMPTY databse called "phpmyadmin" ???
__________________
Amen |
![]() |
![]() ![]() ![]() ![]() ![]() |