Foros del Web » Programando para Internet » PHP »

Warning: mysql_data_seek(): Offset 0 is invalid for MySQL

Estas en el tema de Warning: mysql_data_seek(): Offset 0 is invalid for MySQL en el foro de PHP en Foros del Web. buen dia, alguien me puede ayudar? me sale este codigo de error @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código BASH: Ver original Warning: mysql_data_seek ( ) : Offset 0 ...
  #1 (permalink)  
Antiguo 09/10/2014, 15:24
 
Fecha de Ingreso: octubre-2014
Ubicación: guatemala
Mensajes: 2
Antigüedad: 9 años, 6 meses
Puntos: 0
Warning: mysql_data_seek(): Offset 0 is invalid for MySQL

buen dia, alguien me puede ayudar?
me sale este codigo de error
Código BASH:
Ver original
  1. Warning: mysql_data_seek(): Offset 0 is invalid for MySQL result index 15 (or the query data is unbuffered) in /home/u457585095/public_html/includes/slider.php on line 76

mi codigo completo es...

Código PHP:
Ver original
  1. <?php require_once('Connections/conexionciudadcristiana.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.   if (PHP_VERSION < 6) {
  7.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8.   }
  9.  
  10.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.   switch ($theType) {
  13.     case "text":
  14.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.       break;    
  16.     case "long":
  17.     case "int":
  18.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.       break;
  20.     case "double":
  21.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22.       break;
  23.     case "date":
  24.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.       break;
  26.     case "defined":
  27.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.       break;
  29.   }
  30.   return $theValue;
  31. }
  32. }
  33.  
  34. $maxRows_datosSlider = 4;
  35. $pageNum_datosSlider = 0;
  36. if (isset($_GET['pageNum_datosSlider'])) {
  37.   $pageNum_datosSlider = $_GET['pageNum_datosSlider'];
  38. }
  39. $startRow_datosSlider = $pageNum_datosSlider * $maxRows_datosSlider;
  40.  
  41. mysql_select_db($database_conexionciudadcristiana, $conexionciudadcristiana);
  42. $query_datosSlider = "SELECT * FROM tblslider WHERE tblslider.intEstado = 1 ORDER BY tblslider.intOrden ASC";
  43. $query_limit_datosSlider = sprintf("%s LIMIT %d, %d", $query_datosSlider, $startRow_datosSlider, $maxRows_datosSlider);
  44. $datosSlider = mysql_query($query_limit_datosSlider, $conexionciudadcristiana) or die(mysql_error());
  45. $row_datosSlider = mysql_fetch_assoc($datosSlider);
  46.  
  47. if (isset($_GET['totalRows_datosSlider'])) {
  48.   $totalRows_datosSlider = $_GET['totalRows_datosSlider'];
  49. } else {
  50.   $all_datosSlider = mysql_query($query_datosSlider);
  51.   $totalRows_datosSlider = mysql_num_rows($all_datosSlider);
  52. }
  53. $totalPages_datosSlider = ceil($totalRows_datosSlider/$maxRows_datosSlider)-1;
  54. ?>
  55. <link rel="stylesheet" type="text/css" href="css/estiloslider.css" />
  56. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
  57. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>
  58. <script type="text/javascript">
  59.     $(document).ready(function(){
  60.         $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 7000, true);
  61.     });
  62. </script>
  63.  
  64. <div id="featured" >
  65.           <ul class="ui-tabs-nav">
  66.           <?php $contador=1; ?>
  67.             <?php do { ?>
  68.             <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-<?php echo $contador; ?>"><a href="#fragment-<?php echo $contador; ?>"><img src="images/slider/<?php echo $row_datosSlider['strImagenPequena']; ?>" alt="" /><?php echo $row_datosSlider['strMenu']; ?></a></li>
  69.             <?php
  70.               $contador++;
  71.                } while ($row_datosSlider = mysql_fetch_assoc($datosSlider)); ?>
  72.            
  73.           </ul>
  74.  
  75. <?php
  76.  mysql_data_seek($datosSlider, 0);
  77.  $row_datosSlider = mysql_fetch_assoc($datosSlider);?>
  78.  
  79.         <!-- First Content -->
  80.         <?php $contador=1; ?>
  81.         <?php do { ?>
  82.           <div id="fragment-<?php echo $contador; ?>" class="ui-tabs-panel" style="">
  83.             <img src="images/slider/<?php echo $row_datosSlider['strImagenGrande']; ?>" alt="" />
  84.             <div class="info" >
  85.               <h2><a href="<?php echo $row_datosSlider['strLink']; ?>" ><?php echo $row_datosSlider['strTitulo']; ?></a></h2>
  86.               <p><?php echo $row_datosSlider['strSubtitulo']; ?> <a href="<?php echo $row_datosSlider['strTitulo']; ?>" >Leer m&aacute;s</a></p>
  87.               </div>
  88.             </div>
  89.           <?php
  90.           $contador++;
  91.           } while ($row_datosSlider = mysql_fetch_assoc($datosSlider)); ?>
  92.  
  93.        
  94.  
  95.         </div>
  96. <?php
  97. mysql_free_result($datosSlider);
  98. ?>


AYUDA! que estoy haciendo mal? gracias

Última edición por gnzsoloyo; 09/10/2014 a las 16:09
  #2 (permalink)  
Antiguo 09/10/2014, 16:11
Avatar de gnzsoloyo
Moderador criollo
 
Fecha de Ingreso: noviembre-2007
Ubicación: Actualmente en Buenos Aires (el enemigo ancestral)
Mensajes: 23.324
Antigüedad: 16 años, 4 meses
Puntos: 2658
Respuesta: Warning: mysql_data_seek(): Offset 0 is invalid for MySQL

Cita:
AYUDA! que estoy haciendo mal?
Y... por lo pronto postear en el Foro de MySQL.
Ese warning es tema de PHP, no MySQL. Aunque el problema sea generado por la consulta, se produce en programación, que es OFF TOPIC en este foro.

Movido a PHP.
__________________
¿A quién le enseñan sus aciertos?, si yo aprendo de mis errores constantemente...
"El problema es la interfase silla-teclado." (Gillermo Luque)

Etiquetas: invalid, mysql, offset, select, sql, warning
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:16.