Ir para conteúdo
Fórum Script Brasil

Nxhost

Membros
  • Total de itens

    5
  • Registro em

  • Última visita

Tudo que Nxhost postou

  1. Nxhost

    Erro com mysql_num_rows :s

    ola´amigo, No codigo é: $aucidsnew = $_POST['leiloes']; --------------------------------todo codigo do arquivo: <?php include("config/connect.php"); include("functions.php"); include_once("tempo_sql.php"); $uid = $_SESSION["userid"]; $aucidsnew = $_POST['leiloes']; $qrysel = "select * from auc_due_table where auction_id in (".$aucidsnew.") order by auc_due_time"; $ressel = mysql_query($qrysel); $total = mysql_num_rows($ressel) ; $counter = 0; $p = 0; for($i=1;$i<=$total;$i++){ $obj = mysql_fetch_object($ressel); $newtime = $obj->auc_due_time; $newprice = str_replace(".",",",$obj->auc_due_price); $oldprice = $prices[$p]; $qr = "select * from bid_account ba left join registration r on ba.user_id=r.id where auction_id='".$obj->auction_id."' and bid_flag='d' order by ba.id desc limit 0,1"; $res2 = mysql_query($qr); $total2 = mysql_num_rows($res2); $obj2 = mysql_fetch_object($res2); $username = $obj2->username; if($i==1){ $temp = ''; } else { $temp .= ','; } if($username=='')$username='Sem Lance'; $temp .= '{"leilao":{"id_leilao":"'.$obj->auction_id.'","tempo_leilao":"'.$newtime.'","preço":"'.$newprice.'","id_pessoa":"'.$obj2->user_id.'","usuario":"'.$username.'"}}'; $p++; } echo "[".$temp."]"; ?>
  2. Nxhost

    Erro com mysql_num_rows :s

    adicionei p mostrar a consulta ao banco de dados e deu essa mensagem: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/leilaoap/public_html/update_information.php on line 14 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') order by auc_due_time' at line 1
  3. Nxhost

    Erro com mysql_num_rows :s

    estou num servidor web com cpanel, o host é localhost
  4. Nxhost

    Erro com mysql_num_rows :s

    obrigado pela ajuda, mas entendo pouco nisso, como fazer para executar a consulta directamente no phpMyAdmin? puderes me ajudar pago o serviço.
  5. Nxhost

    Erro com mysql_num_rows :s

    Ola pessoal, alguém ai para me dar uma força nesse código que não fecha as conecções persistentes ao banco de dados. Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/leilaoap/public_html/update_information.php on line 13 [] é na linha 13 do código: $total = mysql_num_rows($ressel); e conforme da erro na linha 14: $counter = 0; código do script: ---------------------------------------------------------------------------------------------------------------------- <?php include("config/connect.php"); include("functions.php"); include_once("tempo_sql.php"); $uid = $_SESSION["userid"]; $aucidsnew = $_POST['leiloes']; $qrysel = "select * from auc_due_table where auction_id in (".$aucidsnew.") order by auc_due_time"; $ressel = mysql_query($qrysel); $total = mysql_num_rows($ressel); $counter = 0; $p = 0; for($i=1;$i<=$total;$i++){ $obj = mysql_fetch_object($ressel); $newtime = $obj->auc_due_time; $newprice = str_replace(".",",",$obj->auc_due_price); $oldprice = $prices[$p]; $qr = "select * from bid_account ba left join registration r on ba.user_id=r.id where auction_id='".$obj->auction_id."' and bid_flag='d' order by ba.id desc limit 0,1"; $res2 = mysql_query($qr); $total2 = mysql_num_rows($res2); $obj2 = mysql_fetch_object($res2); $username = $obj2->username; if($i==1){ $temp = ''; } else { $temp .= ','; } if($username=='')$username='Sem Lance'; $temp .= '{"leilao":{"id_leilao":"'.$obj->auction_id.'","tempo_leilao":"'.$newtime.'","preço":"'.$newprice.'","id_pessoa":"'.$obj2->user_id.'","usuario":"'.$username.'"}}'; $p++; } echo "[".$temp."]"; ?>
×
×
  • Criar Novo...