Good day
What I would like to do is to alter a mysql table with data in it then add manipulated string data to that created column i.e I first add an extra column to my table then add a reverse string coded from data that had already been inserted.
I have an email field in my database so what I would actually do is to take the email address reverse string it then insert it into the newly added mysql column.
My reverse string works perfectly its just that I can't seem to add the extra column to my table, any ideas would be highly appreciated.
Here is my code
$query1="alter table Registration add column Deep text (20)";
$result1=mysql_query($query1);
//here's the query that selects the email field
$sql="select email fromRegistration";
$result2=mysql_query($sql);
While($row=mysql_fetch_array($result2))
{
$my_str=strrev($row['email_add']));
echo $my_str."<br>";
}
But the table isn't getting altered.