Hi i have created an static table having from,subject,date etc and i am just able to display
i have created inbox in the front end how to link.....these table to inbox...i have this code but what is this fuction getdata.....how to proceed just help me pls......

function getdata($tble,$field,$whr) {
       $q="SELECT $field FROM $tble where $whr";
       return $r[0];
     <a href="inbox.php?read" >inbox(<?=$msgcount; ?>)</a>
8 Years
Discussion Span
Last Post by darkagn

This is a generic function to return a specific field ($field) from a table ($tble) in a MySQL database. The exact record returned is specified by the parameter $whr.

So your call:

$msgcount = getdata("messages", "count(*)", "status=0");

will result in the parameter $msgcount being the result of the following sql query:

SELECT count(*) FROM messages WHERE status=0

In other words, the number of messages where the field status=0.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.