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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-07-2004, 11:16 PM   #1
- Jesus Christ -
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
- Jesus Christ - is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:19 PM   #2
toddler
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?
toddler is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:20 PM   #3
Carrie
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?
Carrie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:20 PM   #4
- Jesus Christ -
Confirmed User
 
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
Quote:
Originally posted by toddler
you need to be very verbose in your update such that you have enough where clauses to make a discreet data set. Make sense?
No....



dir listings have pretty colors.

Quote:
Originally posted by Carrie
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?
I only want to change the contents of one row... the wors are all different. Each row only has one value.
__________________

Amen
- Jesus Christ - is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:20 PM   #5
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
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.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:22 PM   #6
- Jesus Christ -
Confirmed User
 
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
Quote:
Originally posted by Armed & Hammered
why would the primary key matter?

UPDATE TABLE SET column='value' WHERE column='value'
Yea I'll just launched putty to try command line.... Webmin is Giving me this BS about a primary key.
__________________

Amen
- Jesus Christ - is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:24 PM   #7
xxxoutsourcing
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
xxxoutsourcing is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:28 PM   #8
Carrie
Confirmed User
 
Join Date: Apr 2002
Location: Virgin - nee
Posts: 3,162
Quote:
Originally posted by Armed & Hammered
why would the primary key matter?

UPDATE TABLE SET column='value' WHERE column='value'
If any of the other rows happen to have the same value, it'll change them too with this statement.

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).
Carrie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:30 PM   #9
JSA Matt
So Fucking Banned
 
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
Quote:
Originally posted by Carrie

If any of the other rows happen to have the same value, it'll change them too with this statement.
Match it up better...

UPDATE table SET this_col='' WHERE col_one='' AND col_two='';

ps: http://www.phpmyadmin.net/
JSA Matt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:33 PM   #10
- Jesus Christ -
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
- Jesus Christ - is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:34 PM   #11
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Quote:
Originally posted by Carrie

If any of the other rows happen to have the same value, it'll change them too with this statement.

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).
Obviously. That's just an example. He's smart enough to narrow it down if he needs to.
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:38 PM   #12
BlueDesignStudios
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]
BlueDesignStudios is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:39 PM   #13
Carrie
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.
Carrie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:40 PM   #14
- Jesus Christ -
Confirmed User
 
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
Quote:
Originally posted by BlueDesignStudios
get out of SQL, in unix type in: rm -r

& and that should do the trick

ITs going through a list of stuff really fast....

??

Whats it doing?
__________________

Amen
- Jesus Christ - is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:40 PM   #15
dotwind
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
dotwind is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:40 PM   #16
Carrie
Confirmed User
 
Join Date: Apr 2002
Location: Virgin - nee
Posts: 3,162
Quote:
Originally posted by BlueDesignStudios
get out of SQL, in unix type in: rm -r

& and that should do the trick

Feeling like having a death wish tonight when he wipes his server?
Carrie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:42 PM   #17
dotwind
Confirmed User
 
Join Date: Dec 2003
Location: Toronto
Posts: 285
Quote:
Originally posted by - Jesus Christ -
ITs going through a list of stuff really fast....

??

Whats it doing?
don't worry it's just looking for what you wanted to do and would do it right now
__________________
Custom large/complex systems programing.<br>ASP.Net, C#, XML, MS SQL, WebServices(SOAP).<br>ICQ: 235719545
dotwind is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:43 PM   #18
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Quote:
Originally posted by BlueDesignStudios
get out of SQL, in unix type in: rm -r

& and that should do the trick

__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:46 PM   #19
toddler
Confirmed User
 
Join Date: Jun 2002
Location: austin, tx
Posts: 1,911
Quote:
Originally posted by - Jesus Christ -
Yea I'll just launched putty to try command line.... Webmin is Giving me this BS about a primary key.

no cli? jesus typed man, no clicky of the mouse for him. you fuckimg imposter!
toddler is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2004, 11:48 PM   #20
- Jesus Christ -
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
- Jesus Christ - is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.