rameshfaj Posted June 8, 2007 Share Posted June 8, 2007 Can anyone say anything that makes the following function call an error: This is a coordination of PHP and Mysql function editjobpost($pid,$description,$ownership,$title,$companyname,$openings,$sex,$age,$qualification,$experience,$skills,$responsibility,$location,$salary,$servicetype,$maritalstatus,$dbconnection) { if(!($description="")||(!($salary=""))||(!($location=""))||(!($title=""))||(!($openings=""))) { $sql="UPDATE jobpost set companyname='".$companyname."' ,title='".$title."',description='".$description."', openings='".$openings."', sex='".$sex."', age='".$age."', qualification='".$qualification."',experience='".$experience."',responsibility='".$responsibility."',skills='".$skills."',ownership='".$ownership."',location='".$location."',salary='".$salary."',service_type='".$servicetype."',maritalstatus='".$maritalstatus."' where pid='".$pid."'"; $result=mysql_query($sql,$dbconnection) or die('<div class="error"> ERROR, while adding new JOB <br>'.mysql_error().'</div>'); return("Job Successfully Updated!!!"); } } Quote Link to comment https://forums.phpfreaks.com/topic/54797-whats-the-problem/ Share on other sites More sharing options...
fenway Posted June 8, 2007 Share Posted June 8, 2007 That's ugly... echo the query after the variables have been substitued. Quote Link to comment https://forums.phpfreaks.com/topic/54797-whats-the-problem/#findComment-271075 Share on other sites More sharing options...
bubblegum.anarchy Posted June 8, 2007 Share Posted June 8, 2007 My money is on a wayward quote.... ... mysql_real_escape_string() Quote Link to comment https://forums.phpfreaks.com/topic/54797-whats-the-problem/#findComment-271177 Share on other sites More sharing options...
rameshfaj Posted June 10, 2007 Author Share Posted June 10, 2007 That's ugly... echo the query after the variables have been substitued. where is the echo? or where it should be or not be used?Its fully functionality implementing the database manipulation! Quote Link to comment https://forums.phpfreaks.com/topic/54797-whats-the-problem/#findComment-271694 Share on other sites More sharing options...
fenway Posted June 11, 2007 Share Posted June 11, 2007 You're sending a query to database... I want to see what the database gets, sans PHP. Quote Link to comment https://forums.phpfreaks.com/topic/54797-whats-the-problem/#findComment-272409 Share on other sites More sharing options...
rameshfaj Posted June 12, 2007 Author Share Posted June 12, 2007 The function is called providing the corresponding values.When the function is called nothing result comes even if there are the corresponding data in the corresponding tables. Quote Link to comment https://forums.phpfreaks.com/topic/54797-whats-the-problem/#findComment-272937 Share on other sites More sharing options...
fenway Posted June 17, 2007 Share Posted June 17, 2007 Still... echo the $sql variable. Quote Link to comment https://forums.phpfreaks.com/topic/54797-whats-the-problem/#findComment-276324 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.