Jump to content
Fórum Script Brasil
  • 0

Alguém sabe resolver esse problema?


Pedrohas2000

Question

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 to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 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";

Edited by RaphinhaxP
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...