Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 11:25 pm EST

Geeklog Forums

Can someone make this a function?


JimmyMac

Anonymous
This function thing is way over my head. I know how to make some php code work in Postnuke blocks but this function code is beyond my skills

I want to make a block out of this php code

---------------------------------------------------

require("config.php");
$db->open("SELECT * FROM songlist WHERE songtype='S' ORDER BY date_played DESC LIMIT 1");
$history = $db->rows();
reset($history);
list($key, $song) = each($history);
?>

Currently we're playing by
echo $song["artist"]; ?>


which is from the album $song["album"]; ?>.

has been played
times

and requested times.



------------------------------

Any help would be appreciated. One more thing is there a geeklog version of PostWrap.. Postwrap allows you to display a dymanic web page inside of Postnuke

Thanks.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
that's really not enough information to go on to make a proper function for a geeklog block.
almost though Wink
maybe provide your songlist table structure; explain the purpose of rows() and confirm that $song is an array stored in the second column of this table.

and next time you may want to use the CODE tags to enclose your code because it seems much of it was stripped or else that code just makes no sense.

as for you second question... try an iframe in a static page or maybe the external pages plugin.

hope that helps
 Quote

All times are EST. The time is now 11:25 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content