Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.