473,503 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to copy a row from a table'tipuranibasti'(one field is blob type)to'puranibasti'

1 New Member
in my code all field are copied from tipuranibasti to puaranibasti except image(blob one).in table puranibasti it($image field) shows entry as [BLOB - 0B]

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. include ("connect.php");
  3. $id=@addslashes($_GET['id']);
  4. $image=@mysql_query("select * from tipuranibasti where  id = $id");
  5. $image_row=@mysql_fetch_assoc($image);
  6.  
  7.    $name=@$image_row['name'];
  8.    $date=@$image_row['date']; 
  9.    $msg=@$image_row['msg'];
  10.    $image=addslashes(@file_get_contents($image_row['image']));
  11.  
  12.  
  13. if(@mysql_query("insert into puranibasti values('','$name','$date','$msg','$image')"))
  14. {
  15.     echo "image has been inserted successfully";
  16. } else
  17.  {
  18.  echo "problem inserting the image";
  19.  }
  20. ?>
  21.  
Dec 25 '11 #1
0 1359

Sign in to post your reply or Sign up for a free account.

Similar topics

1
8500
by: Svelte Poshy | last post by:
Copy the content of a field into another field In my table Customers i want to copy the content of the field "Employee" which is a text field, into the field MOL, also a text field I need to...
1
1749
by: Geir Baardsen | last post by:
Hi! As you can see I have worked with my code and done some changes. Now the code will execute, because of this, and because I took away some code in the OnCurrent event that was probably causing...
4
4542
by: feng | last post by:
For a HTTP textbox with a Type of "password", the default behaiver is that the field will be cleared out when the page is posted back. This make sense in most of the cases. But in some situation,...
4
1358
by: micatcat | last post by:
Hello, I have a text field that gets populated when the user clicks on the submit button. How do I transfer this field onto a Word document? Please help me.
17
3587
by: amanda27 | last post by:
Can anyone help me. I have a database that has a form. On the form I have a subform that brings in some data that is relevant to the data on the main form but from a week before (status of projects...
3
2029
by: elainenguyen | last post by:
I want to add a new record and then copy the field DCDate over to the new record, but when I click on the command button it only adds a new record, but didn't copy the DCDate over. Can any body help?...
3
9225
by: Richnep | last post by:
Hi all, I have tabbed subforms where I need to copy one field value from one subform over to another subform. Although I can run an update query to accomplish this I would like to do it through...
19
6042
by: VUNETdotUS | last post by:
Firefox showed me a security error when I was copying a value of file field object into new DOM created input file field. Can I do something about it? Thanks.
9
1581
by: SuzK | last post by:
In Access 2002, I have created a Make Table query to add a new field “Base$” through a custom function, moving average, that averages each 8 weeks of data. However, I also need to calculate a...
2
1359
rightclick
by: rightclick | last post by:
I am setting up a database to be used to keep a point ranking system for my table tennis school. I have a table tblMain with records for each player. It includes a field called StartOfSeasonRank....
0
7063
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.