Hello
I have error below,
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/onstaged/public_html/admin/edit_parsecall.php on line 31
PHP code,
<?php
require_once( "../config/config.inc.php" );
if( isset($_REQUEST[ editid ]) && $_REQUEST[ action ] == "edit" ) {
$editid = $_REQUEST[ editid ];
//echo $profile_id;
}
/*
date_posted expiration gender ethnicity country state city zipcode agerange categories uniontext rate
listeddate email link_partial link_complete
title description email description
*/
if(isset($_POST['updateparse']))
{
#$query="update `tbl_parsing_call` set parse_title='{$_POST[fname]}',parse_email='{$_POST[lname]}', parse_emailcontent='{$_POST[adname]}',parse_message='{$_POST[ademail]}' where id='{$editid}'";
$query="update `castingcall` set title='{$_POST[title]}', email='{$_POST[email]}', description='{$_POST[description]}' where id='{$editid}'";
$DB->Execute($query);
if(!$DB->Execute($query)) Redirect( "Updation Failed.", "viewparsingcalls.php" );
else Redirect( "Parsing Calls modified Successfully.", "viewparsingcalls.php" );
} else {
#$query_profile = "select id,parse_title,parse_email,parse_emailcontent,parse_message from `tbl_parsing_call` where id='{$editid}'";
#$query_profile = "select castingid, title, email, description from `castingcall` where id='{$editid}'";
#$profile_details = $DB->getArray( $query_profile );
$sql = "SELECT castingid, title, email, description FROM castingcall where id='{$editid}'";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)) {
echo $row["castingid"];
echo "<br>";
echo $row["title"];
echo "<br>";
echo $row["email"];
echo "<br>";
echo $row["description"];
}
echo "<pre>";
print_r($array_tmp);
echo "<pre>";
#$smarty->assign('results', mysql_fetch_array($result));
$adminsmarty-> assign("delete_msg",$saved_delete);
$adminsmarty-> assign("title", "Edit Parsing Calls" );
#$adminsmarty-> assign("profile_details", $profile_details );
$adminsmarty-> display('modules/admin/edit_parsecall.tpl');
}
?>
Anyone would like to help me.
Thanks in advance.