Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/02/2011, 06:03
colextey
Invitado
 
Mensajes: n/a
Puntos:
necesito colaboracion porfavor con php y query.

Hola gracias por poner sus ojos aqui y ayudarme, tengo un problema pero no es tan grave aver si me pueden dar una manica.

Cita:
<?php

if ($pag) {

$total = $pag * 10;

$pagx = $total - 10;

$musica=mysql_query("SELECT t1.post_id AS post_id, t1.meta_key AS meta_key, t1.meta_value AS meta_value, t2.ID AS ID, t2.post_type AS post_type, t2.post_title AS post_title, t2.post_date AS post_date, t2.post_name AS post_name, t2.post_content AS post_content, t3.meta_key AS meta_key, t3.meta_value AS meta_value2, t3.post_id AS post_id FROM utf8postmeta AS t1 INNER JOIN utf8posts AS t2 INNER JOIN utf8postmeta t3 ON (t1.meta_key = 'thumbnail' && t2.post_type = 'post' && t1.post_id = t2.ID && t3.meta_key = 'ano' && t2.post_type = 'post' && t3.post_id = t2.ID) WHERE post_status= 'publish' ORDER BY t2.post_date DESC limit $pagx,10",$conexion);

} else {

$musica=mysql_query("SELECT t1.post_id AS post_id, t1.meta_key AS meta_key, t1.meta_value AS meta_value, t2.ID AS ID, t2.post_type AS post_type, t2.post_title AS post_title, t2.post_date AS post_date, t2.post_name AS post_name, t2.post_content AS post_content, t3.meta_key AS meta_key, t3.meta_value AS meta_value2, t3.post_id AS post_id FROM utf8postmeta AS t1 INNER JOIN utf8posts AS t2 INNER JOIN utf8postmeta t3 ON (t1.meta_key = 'thumbnail' && t2.post_type = 'post' && t1.post_id = t2.ID && t3.meta_key = 'ano' && t2.post_type = 'post' && t3.post_id = t2.ID) WHERE post_status= 'publish' ORDER BY t2.post_date DESC limit 10",$conexion);

}

$i=0;

while($row1 = mysql_fetch_assoc($musica)) {

$titlee = utf8_encode($row1['post_title']);

$imagen = $row1['meta_value'];

$ano = $row1['meta_value2'];

$date = $row1['post_date'];

$dire = $row1['post_name'];

$letra = utf8_encode($row1['post_content']);

if ($i <= 10) {

$string..........
no se si agregue bien $ano = $row1['meta_value2']; ya que en la primera pagina me anda bien pero despues sigo para la segunda y va mal no muestra nada si le quito lo que corresponde y que me invente de $ano = $row1['meta_value2']; si queda bueno pero sin el año, como lo puedo hacer para poner varios meta_value sin afectar el codigo muchisimas gracias para quien me ayude gracias.