I lost! with this? any one can suggest me some way to do this?,
Now I try this, past all data bye get , and use the temp var with the
query , but I don't have a good results...
$colname_rs_con sulta = "a";
if (isset($_GET['buscar'])) {
$colname_rs_con sulta = $_GET['buscar'];
}
if (($_GET['criterio']) == 1) {
$temp = "lb_libros_titu lo";
} elseif (($_GET['criterio']) == 2) {
$temp = "lb_libros_auto r";
}
echo $temp;
mysql_select_db ($database_edit orialconn, $editorialconn) ;
$query_rs_consu lta = sprintf("SELECT * FROM lb_libros WHERE '$temp'
LIKE %s", GetSQLValueStri ng("%" . $colname_rs_con sulta . "%",
"text"));
$query_limit_rs _consulta = sprintf("%s LIMIT %d, %d",
$query_rs_consu lta, $startRow_rs_co nsulta, $maxRows_rs_con sulta);
$rs_consulta = mysql_query($qu ery_limit_rs_co nsulta, $editorialconn)
or die(mysql_error ());
$row_rs_consult a = mysql_fetch_ass oc($rs_consulta );
saludos
cana
Now I try this, past all data bye get , and use the temp var with the
query , but I don't have a good results...
$colname_rs_con sulta = "a";
if (isset($_GET['buscar'])) {
$colname_rs_con sulta = $_GET['buscar'];
}
if (($_GET['criterio']) == 1) {
$temp = "lb_libros_titu lo";
} elseif (($_GET['criterio']) == 2) {
$temp = "lb_libros_auto r";
}
echo $temp;
mysql_select_db ($database_edit orialconn, $editorialconn) ;
$query_rs_consu lta = sprintf("SELECT * FROM lb_libros WHERE '$temp'
LIKE %s", GetSQLValueStri ng("%" . $colname_rs_con sulta . "%",
"text"));
$query_limit_rs _consulta = sprintf("%s LIMIT %d, %d",
$query_rs_consu lta, $startRow_rs_co nsulta, $maxRows_rs_con sulta);
$rs_consulta = mysql_query($qu ery_limit_rs_co nsulta, $editorialconn)
or die(mysql_error ());
$row_rs_consult a = mysql_fetch_ass oc($rs_consulta );
saludos
cana
Comment