472,110 Members | 2,207 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,110 software developers and data experts.

$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 2299
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
reply views Thread by leo001 | last post: by

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.