|
|
|
|
|
|
![]() |
#1 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
![]() Seems like there should be a find and replace in there someplace.
This is what I'm trying to do… I'm running PhpAdsNew and all this time I have left the target field blank. Now I want to change this to target _top. Since I can't find an easy way to do this in PhpAdsNew other then to do each ad one by one I thought I would see if I could use phpMyAdmin to do this. In phpMyAdmin I can change the value one by one in ad, just like I can do in the PhpAdsNew admin, but still can not find a way to do it globally. So anyone know of a way to change the value of a field using phpMyAdmin? I've thought of doing a database dump and then using my code editor and then reuploading my database, but it seems like there should be a way of doing this in phpMyAdmin. |
![]() |
![]() |
![]() |
#2 | |
Bonged
Join Date: Mar 2003
Location: BrisVegas, AUSTRALIA
Posts: 4,882
|
Cleo you should be able to replace them with one query
..dependent on table structure etc Does the "target" option have its own table? Something like.. Quote:
DD
__________________
Old Dollars >>>> Now with over 90 Hosted Free Sites <<<< DangerDave.com.au - Adult Links to Free Porn |
|
![]() |
![]() |
![]() |
#3 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
SELECT *
FROM `phpads_banners` `target` This displays all the banners that I have already changed to _top. Doesn't display the ones where it is still blank. I seem to get an error on anything else that I try. Maybe it is time to go buy MySQL for dummies. lol |
![]() |
![]() |
![]() |
#4 |
Bonged
Join Date: Mar 2003
Location: BrisVegas, AUSTRALIA
Posts: 4,882
|
Assuming 'target' is a field in the 'phpads_banners' table...
SELECT * FROM phpads_banners WHERE target="" Should get you the "empty ones", and you should be able to update them... ? I am half way thru SQL for Super Dummies! DD
__________________
Old Dollars >>>> Now with over 90 Hosted Free Sites <<<< DangerDave.com.au - Adult Links to Free Porn |
![]() |
![]() |
![]() |
#5 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Yeah that does, but all that this gets me is 17 pages of 30 each that can be updated one by one.
Getting closer… |
![]() |
![]() |
![]() |
#6 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
I GOT IT!
![]() I was helped, a lot, by PhpMyAdmin in writing this. UPDATE `phpads_banners` SET `target` = '_top'; While I was messing around I noticed that it would put the expression on the page for me if I modified a table. Like this Affected rows: 1 SQL-query : [Edit] [Create PHP Code] UPDATE `phpads_banners` SET `target` = '_top' WHERE `bannerid` = '254' LIMIT 1 ; Showing rows 270 - 299 (489 total, Query took 0.0049 sec) SQL-query : [Edit] [Explain SQL] [Create PHP Code] SELECT * FROM `phpads_banners` LIMIT 270 , 30 Well damn it was showing me the code all along and I didn't even realize it. lol |
![]() |
![]() |
![]() |
#7 |
Bonged
Join Date: Mar 2003
Location: BrisVegas, AUSTRALIA
Posts: 4,882
|
Way cool Cleo..
I knew if SELECT * FROM phpads_banners WHERE target="" worked we were close ![]() DD
__________________
Old Dollars >>>> Now with over 90 Hosted Free Sites <<<< DangerDave.com.au - Adult Links to Free Porn |
![]() |
![]() |
![]() |
#8 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
I'm blown away at how well phpmyadmin works, can't believe that it is free.
Everything that I'm using now is MySQL except my link list script so having this to work with my databases is really sweet. ![]() |
![]() |
![]() |
![]() |
#9 |
Bonged
Join Date: Mar 2003
Location: BrisVegas, AUSTRALIA
Posts: 4,882
|
__________________
Old Dollars >>>> Now with over 90 Hosted Free Sites <<<< DangerDave.com.au - Adult Links to Free Porn |
![]() |
![]() |
![]() |
#10 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
LOL, I had forgotten all about that thread.
I still find my server scripts that do database dumps each night easier for doing backups, but phpmyadmin is way up there on my list of must have tools now. ![]() Actually this is the first time that I have ever really used it except to repair a table after a bad server crash. ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#11 |
If something goes wrong at the plant, blame the guy who can't speak English
Join Date: Apr 2003
Location: Europe
Posts: 306
|
Nice link Dave - will have to grab a copy of that! Cheers!
![]() |
![]() |
![]() |
![]() |
#12 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
phpMyAdmin is a Godsend, however it has really screwed up my knowledge of doing mySQL stuff from the SSH prompt. LOL
Cleo and everyone else, make SURE you password protect the directory containing it though. Don't even have to be a proficient cracker to annihilate your database if that directory isn't protected.
__________________
Please Re-Read The Rules For Sig Files |
![]() |
![]() |
![]() |
#13 | |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Quote:
The way I have it set up it asks for the user ID and password of the database that you want to connect to so there is no password protection on the directory itself. I tried also password protecting its directory but then I was unable to access it unless I made the user ID and password the same as the database so I figured what was the point. Also since I have multiple databases I didn't see a way to do this. This is how I have it set. $cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)? $cfg['Servers'][$i]['user'] = ''; // MySQL user $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed // with 'config' auth_type) I did put it in a directory with a just about impossible name to guess. |
|
![]() |
![]() |
![]() |
#14 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
The db config section of phpMyAdmin is an array, so you can connect to all your databases at once. However, the way you are doing it works too.
![]()
__________________
Please Re-Read The Rules For Sig Files |
![]() |
![]() |
![]() |
|
|