<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include '../conector.php';

echo "=== Estructura de planilla_detalle ===\n";
$sql = "DESCRIBE planilla_detalle";
$res = mysql_query($sql);
while($row = mysql_fetch_assoc($res)){
    echo $row['Field'] . " - " . $row['Type'] . "\n";
}

echo "\n=== Un registro de planilla_detalle ===\n";
$sql2 = "SELECT * FROM planilla_detalle WHERE planilla = 9 LIMIT 1";
$res2 = mysql_query($sql2);
$row2 = mysql_fetch_assoc($res2);
print_r($row2);
?>