phpMyAdmin, change data
Moderator: General Moderators
phpMyAdmin, change data
sorry, i'm a newbie
and i don't know how to change some data in a table. I only see a possibility to enter a whole new row... thx!
Use something like this...
If you don't know the value you want to change then just do this..
Hope this helps.
Code: Select all
<?php
$change_from_this="Bob";
$change_to_this="Mike";
mysql_query(" UPDATE `your_table` SET `name`='$change_to_this' WHERE `name`='$change_from_this' ");
?>If you don't know the value you want to change then just do this..
Code: Select all
<?php
$change_to_this="Red";
mysql_query(" UPDATE `your_table` SET `colour`='$change_to_this' ");
?>Hope this helps.
Sorry I don't understand what you mean.
The above script would be used in a PHP page and unless you want to do it by deleting an old row and entering a new one it's basically the easiest way of changing data.
If you want to change the information manually then use phpmyadmin.
If you don't know how to use phpmyadmin then read the manual.
The above script would be used in a PHP page and unless you want to do it by deleting an old row and entering a new one it's basically the easiest way of changing data.
If you want to change the information manually then use phpmyadmin.
If you don't know how to use phpmyadmin then read the manual.
slect browse
In phpMyAdmin if that is what I understand you are using
On the left side select the table that has the row you wich to update.
Select browse and keep clicking the > button until you see the row that needs to be updated.
Click on edit, the page will the turn into a form that will allow you to edit the data.
At the bottom click save.
Or if you have a large table you can run an SQL query to limit the result set, but if you are going through that effort you might as well run a SQL script that uses UPDATE.
phpScott
On the left side select the table that has the row you wich to update.
Select browse and keep clicking the > button until you see the row that needs to be updated.
Click on edit, the page will the turn into a form that will allow you to edit the data.
At the bottom click save.
Or if you have a large table you can run an SQL query to limit the result set, but if you are going through that effort you might as well run a SQL script that uses UPDATE.
phpScott