Jump to content

fetching the maximum value of a field from a table


ramjai

Recommended Posts

hi everybody,

          I want to fetch the maximum value of a field called type from the table named type but i am not getting the result any one can help me.

Coding

 $type1=pg_query("select max(type) from type where layerid=$lay AND categoryid='$cat3'");
                 $type2=pg_num_rows($type1);
                 $typ=pg_fetch_object($type1); 
                 echo $typ->type;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.