Ir para conteúdo
Fórum Script Brasil
  • 0

Alguém sabe resolver esse problema?


Pedrohas2000

Pergunta

Olá boa noite gente, to com um probleminha aqui que não to conseguindo resolver... um erro de sintaxe no script.

Se alguém souber e puder dar uma força

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 'call from hm2_history where '2011-9-1' + interval 0 day < date + interval 0 hour' at line 1

A sintaxe está dessa forma:

$q = '' . 'select count(*) as call from hm2_history where ' . $datewhere . ' ' . $typewhere . ' ' . $ecwhere . ' and user_id = ' . $id;

($sth = mysql_query ($q) OR print mysql_error ());

$row = mysql_fetch_array ($sth);

$count_all = $row['call'];

====================================================================================

$datewhere = '\'' . $frm['year_from'] . '-' . $frm['month_from'] . '-' . $frm['day_from'] . '\' + interval 0 day < date + interval ' . $settings['time_dif'] . ' hour and ' . '\'' . $frm['year_to'] .

E também essse erro:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/maxhostb/public_html/hyip/inc/earning_history.inc on line 2

ESsas são as 2 primeiras linhas:

<?

$id = $userinfo['id'];

$type = $frm['type'];

$type_found = 0;

$options = array ();

$q = '' . 'select type from hm2_history where user_id = ' . $id . ' group by type order by type';

($sth = mysql_query ($q) OR print mysql_error ());

while ($row = mysql_fetch_array ($sth))

{

if ($row['type'] ==

Algue´m tem alguma ideia do que seja? já tentei de tudo que meu conhecimento pode, mas não deu... <_<

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0
Olá boa noite gente, to com um probleminha aqui que não to conseguindo resolver... um erro de sintaxe no script.

Se alguém souber e puder dar uma força

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 'call from hm2_history where '2011-9-1' + interval 0 day < date + interval 0 hour' at line 1

A sintaxe está dessa forma:

$q = '' . 'select count(*) as call from hm2_history where ' . $datewhere . ' ' . $typewhere . ' ' . $ecwhere . ' and user_id = ' . $id;

($sth = mysql_query ($q) OR print mysql_error ());

$row = mysql_fetch_array ($sth);

$count_all = $row['call'];

====================================================================================

$datewhere = '\'' . $frm['year_from'] . '-' . $frm['month_from'] . '-' . $frm['day_from'] . '\' + interval 0 day < date + interval ' . $settings['time_dif'] . ' hour and ' . '\'' . $frm['year_to'] .

E também essse erro:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/maxhostb/public_html/hyip/inc/earning_history.inc on line 2

ESsas são as 2 primeiras linhas:

<?

$id = $userinfo['id'];

$type = $frm['type'];

$type_found = 0;

$options = array ();

$q = '' . 'select type from hm2_history where user_id = ' . $id . ' group by type order by type';

($sth = mysql_query ($q) OR print mysql_error ());

while ($row = mysql_fetch_array ($sth))

{

if ($row['type'] ==

Algue´m tem alguma ideia do que seja? já tentei de tudo que meu conhecimento pode, mas não deu... <_<

Tenta modificar essa linha assim :

$q = ''select type from hm2_history where user_id = '". $id ."' group by type order by type";

Editado por RaphinhaxP
Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      652k
×
×
  • Criar Novo...