user4fun Posted March 3, 2006 Share Posted March 3, 2006 this may seem to be weired but hey, for a very small business, it might just what i am looking for.i have created table, yada yada yadathe forms the insert, select , yada yada yadawhat i am trying to do is combine another insert statment with the select statment, here is what i have<html><head> <title>THANK YOU</title></head><body><?php echo "You are searching for the status of <b>$ui</b><br>"; //this works$link = mysql_connect("", "", ""); //this works mysql_select_db("Business"); //this also works$query = "SELECT * FROM Profile WHERE Domain='$ui'";$result=mysql_query($query) or die ("could not execute");$row = mysql_fetch_array($result,MYSQL_ASSOC);extract($row);if($ui == $Domain){ echo "SOME TEXT <b>$Status</b><br>"; include("/inc/StatusList.inc"); }else{ echo " some text"; //up to this point every thing is fine}here is what i need to add another statment INSERT INTO checking (checkID, checked) VALUES (' ',$ui);?> </body></html> Link to comment Share on other sites More sharing options...
aspnetguy Posted March 3, 2006 Share Posted March 3, 2006 Had you look a little closer you would have seen the post directly below yours about joining 2 update statements.No you cannot join statemenst except with selectsJust create the insert query seperately and run right after the select. The 2 queries have nothing in common...there is no need and no way to combine them.You could also create a stored procedure. Link to comment Share on other sites More sharing options...
user4fun Posted March 3, 2006 Author Share Posted March 3, 2006 thank you for your help, i did look alittle and did find the post underneath me and did read the semicolon post that may seperate them and i was not sure about the syntax of that nor could i find a sample .thank you for your time. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now