Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPDoc return type for MySQL Resource

Tags:

phpdoc

What is convenient name return type for MySQL resource in PHPDoc?

example i have this code

/**
 * Get table data
 * @param type $table
 * @param type $select
 * @param type $condition
 * @return mysql_resource
 */
function getResource($table, $field, $condition) {
    $resource = mysql_query("SELECT $field FROM $table WHERE $condition ");
    return $resource;
}

as you can see @return i write mysql_resource,
is there any convenient name for return mysql resource?

like image 391
GusDeCooL Avatar asked Oct 18 '25 15:10

GusDeCooL


1 Answers

This is typically handled by just "@return resource"... I believe just "resource" matches how var_dump() would show as the object's datatype.

like image 152
ashnazg Avatar answered Oct 22 '25 08:10

ashnazg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!