filtrer les vides

This commit is contained in:
WEBER Antoine 2015-09-14 23:29:28 +02:00
parent 923d827063
commit e7793513f7
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ router.get('/', function(req, res, next) {
+ " FROM metadata_items i, media_parts p "
+ " WHERE p.media_item_id=i.id ORDER BY i.title ASC", function(err, row) {
var tab = row.file.split('/');
var filename = tab[tab.length -1];
var tab2 = tab[tab.length -1].split('\\');
var filename = tab2[tab2.length -1];
if(row.title != '')
html += "<tr><td><a href='/file/"+ row.id + "/"+filename+"'> " + row.title + "</a></td><td>"+row.second+"</td><td>"+row.year+"</td></tr>";
},
//aprés toute les opération de la base