Hello,
I am using the following code, and i get an error on the last statement (last line). The error only shows up for the entries that don't exist in the 815SF_attachments table.
Error is -
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 16 in ...index.php on line 25
Any ideas? It's probably something stupid that I'm overlooking.
PHP Code:$select = "SELECT ID_MEMBER FROM 815SF_themes WHERE variable = 'cp1' ORDER BY ID_MEMBER";
$query = mysql_query($select)or die(mysql_error());
while($list = mysql_fetch_object($query))
{
$id = $list->ID_MEMBER;
$sql = "SELECT value FROM 815SF_themes WHERE ID_MEMBER = " . $id . " AND variable = 'cp1'";
$res = mysql_query($sql);
$flname = mysql_result($res, 0);
$sql = "SELECT filename FROM 815SF_attachments WHERE ID_MEMBER = " . $id;
$res = mysql_query($sql);
$avatar = mysql_result($res, 0);






Bookmarks