Jump to content

HELP WITH UPDATING DB!!


daxguy

Recommended Posts

	                 $query1 = "select * from movies where title = '".$title."' ;";
		 $result1 = mysql_query($query1) or die('Could Not Execute The Query');
		 while ($row = mysql_fetch_assoc($result1) )
                       {			
                       for($f=0; $f<$parts[$current_k]; $f++ )
		{
		        touch("$base_folder/{$hos}/".$linking[$sum].".php");


			$old_part_href = $row['href_parts'];

			$updated_part = $old_part_href.$new; 
			$query_href = 'update movies set href_parts = \''.$updated_part.'\'';
			mysql_query($query_href) or die('COULD NOT EXECUTE THE QUERY FOR PARTS HREF');											
			$new = "{$base_folder}/{$hos}/".$linking[$sum].".php";


			$sum++;
			}
                      }

 

what i am trying to do is take the value of href_parts and add the new href of the page to the existing value on the href_parts and update the href_parts field in my db.. but i am not getting the desired results.. all i am getting in the db is the last value that is passed in the loop in the db.. i want to save the values which are exisiting in the db and add the newly created values to itt.. can anyone help please..

Link to comment
https://forums.phpfreaks.com/topic/210796-help-with-updating-db/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.