Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 01:37 pm EDT

Geeklog Forums

How to...?


Anonymous

Anonymous
How to put 2 functions output from lib_common.php into 1 block? or can someone explain me how to put 2 mysql queries into 1 function? thanks..
 Quote

Status: offline

ndarlow

Forum User
Junior
Registered: 06/30/02
Posts: 31
Block content is created by returning a string representation of the required HTML from the block function itself. There is no reason why the block function can't call other functions which return portions of HTML output. It just needs to concatenate the return values. You can perform as many queries as you like in your code. You will have to parse the results of the queries into your return value in some fashion. I'd suggest looking at the Geeklog code for examples of how things can be done using the API that exists within lib-common.php, lib-database.php, etc. Regards, Neil Darlow M.Sc.
 Quote

All times are EDT. The time is now 01:37 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