pipes_get_pipe($id, $call = 'path')
pipes/pipes.module, line 180
Get information for a pipe
s $id = the string or numeric identifier of the pipe $call = the type of identifierm values may be "path" or "pid"
$pipe = an object populated with data about the pipe
function pipes_get_pipe($id, $call = 'path') {
switch ($call) {
case 'path':
$sql = "SELECT pid, name, url, path FROM {pipes} WHERE path = '%s'";
$pipe = db_fetch_object(db_query($sql, $id));
break;
case 'pid':
$sql = "SELECT pid, name, url, path FROM {pipes} WHERE pid = %d";
$pipe = db_fetch_object(db_query($sql, $id));
break;
}
return $pipe;
}