469,636 Members | 1,527 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,636 developers. It's quick & easy.

$q="INSERT INTO proj select * from projtemp where projid ='".$projid."'";

232 100+
Expand|Select|Wrap|Line Numbers
  1. $projid=$_GET['projid'];
  2. $q="INSERT INTO proj select * from projtemp where projid ='".$projid."'";
  3.  $qins=mysql_query($q);
is resulting false
is there any error?
there are 2 tables in a database with name proj and projtemp
Aug 10 '09 #1
2 2229
numberwhun
3,503 Expert Mod 2GB
@kkshansid
First, I would make sure that when running this through the web page you are running it from, that it the sql statement returns what you expect.

Second, you could always try replacing the quote sequence you have, making this:

Expand|Select|Wrap|Line Numbers
  1. projid ='".$projid."'
  2.  
with:

Expand|Select|Wrap|Line Numbers
  1. projid =\".$projid.\"
  2.  
Sometimes its better to escape the double quotes to remove their meaning.

Regards,

Jeff
Aug 10 '09 #2
kkshansid
232 100+
@numberwhun
it solved no of columns ware different in both tables
Aug 12 '09 #3

Post your reply

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

Similar topics

2 posts views Thread by newbie_mw | last post: by
1 post views Thread by newbie_mw | last post: by
2 posts views Thread by EricRobineau | last post: by
20 posts views Thread by Mark Harrison | last post: by
6 posts views Thread by Brock | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.