Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12384
Latest: MildredGarrido
New This Month: 8
New This Week: 0
New Today: 0
Stats
Total Posts: 39888
Total Topics: 7022
Most Online Today: 65
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 42
Total: 42

Author Topic: sql syntax error populating the error log at the rapid rate  (Read 2808 times)

0 Members and 1 Guest are viewing this topic.

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
sql syntax error populating the error log at the rapid rate
« on: October 02, 2017, 09:01:19 pm »
Quote
Database Error: 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 '' at line 4Apply Filter: Only show the errors from this file File: /xxxxxx/Sources/adseller2.php
Line: 2543

thoughts on this? 

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14953
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #1 on: October 02, 2017, 09:32:43 pm »
Can you post what is on that line on the file . Doesn't' seem to matchup with my version. Post a coupleines
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #2 on: October 02, 2017, 09:35:44 pm »
Code: [Select]
// Get other places revshare chance
2533: $num =  rand(1,100);
2534:
2535: if ($num <= $AdSellerSettings['seller_revshare_other_chance'])
2536: {
2537: $showRevshare = true;
2538:
2539: $resultTopic = $smcFunc['db_query']('', "
2540: SELECT
2541: ID_MEMBER_STARTED
2542: FROM {db_prefix}topics
==>2543: WHERE ID_TOPIC = $topic");
2544: $topicRow = $smcFunc['db_fetch_assoc']($resultTopic);
2545: if (!empty($topicRow['ID_MEMBER_STARTED']))
2546: $topicSQLQuery = ' AND a.ID_MEMBER = ' . $topicRow['ID_MEMBER_STARTED'];
2547: }
2548: }
2549:
2550: if ($showRevshare == true)
2551: {
2552: $boardCheck = '';
2553: $revShareQuery = ' AND a.isRevShare = 1  ' . $topicSQLQuery;
2554: // allowrevshare
2555: }
2556: }
2557: // End Revenue Sharing
i/m a wittle bitty bear in deez woods.... i can likely do what you ask, but can't make any sense of this on my own

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14953
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #3 on: October 02, 2017, 09:38:22 pm »
before
Code: [Select]
$showRevshare = true;
2538:
2539: $resultTopic = $smcFunc['db_query']('', "
Add
Code: [Select]
$topic = (int) $topic;
« Last Edit: October 02, 2017, 09:47:59 pm by SMFHacks »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #4 on: October 02, 2017, 09:44:42 pm »
i'll let you know how it goes or what happens... I made the alteration, but now it'll be a matter of monitoring the error log to see if it strikes again.... I don't know how to test it.

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #5 on: October 03, 2017, 10:13:23 am »
this worked without hitch... thank you, Sir, for the outstanding support!

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #6 on: October 03, 2017, 11:46:36 am »
seeing another error I can't make heads or tales of.... line 1503 from the snippet below:

Code: [Select]
1493: // Get Total Pages
1494: $dbresult = $smcFunc['db_query']('', "
1495: SELECT
1496: COUNT(*) AS total
1497: FROM {db_prefix}seller_ad 
1498: WHERE removed = 0
1499: ");
1500: $row = $smcFunc['db_fetch_assoc']($dbresult);
1501: $numofrows = $row['total'];
1502: $smcFunc['db_free_result']($dbresult);
==>1503: $context['start'] = (int) $_REQUEST['start'];
1504:
1505: $dbresult = $smcFunc['db_query']('', "
1506: SELECT
1507: a.ID_AD, a.title, a.approved, a.ID_MEMBER, a.total_views, a.impressionslimit,
1508: a.clickslimit, a.total_clicks, a.isrevshare, m.real_name, a.adtype, a.maximpressionsperday ,
1509: a.todayimpressions, a.enddate     
1510: FROM {db_prefix}seller_ad AS a
1511: LEFT JOIN {db_prefix}members AS m ON (a.ID_MEMBER = m.ID_MEMBER)
1512: WHERE a.removed = 0
1513: ORDER BY a.ID_AD DESC
1514: LIMIT $context[start],10
1515: ");
1516: $styleClass = 'windowbg';
1517: while($row = $smcFunc['db_fetch_assoc']($dbresult))
1518: {
1519:
1520: $approvalStatus = $txt['seller_text_pending'];
1521:
1522: if ($row['approved'] == 1)
1523: $approvalStatus = $txt['seller_text_approved'];

it say's "call to undefined index"....

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14953
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #7 on: October 03, 2017, 12:18:44 pm »
Try  find
Code: [Select]
$context['start'] = (int) $_REQUEST['start'];
Change to
Code: [Select]
if (isset($_REQUEST['start'] ))
$context['start'] = (int) $_REQUEST['start'];
else
$context['start']  = 0;
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #8 on: October 03, 2017, 12:34:39 pm »
thank you, Sir.... will do this afternoon. 

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #9 on: October 03, 2017, 03:50:39 pm »
the error moved, but....

Code: [Select]
// Get Total Pages
1497: $dbresult = $smcFunc['db_query']('', "
1498: SELECT
1499: COUNT(*) AS total
1500: FROM {db_prefix}seller_ad 
1501: WHERE removed = 0
1502: ");
1503: $row = $smcFunc['db_fetch_assoc']($dbresult);
1504: $numofrows = $row['total'];
1505: $smcFunc['db_free_result']($dbresult);
==>1506: $context['start'] = (int) $_REQUEST['start'];
1507:
1508: $dbresult = $smcFunc['db_query']('', "
1509: SELECT
1510: a.ID_AD, a.title, a.approved, a.ID_MEMBER, a.total_views, a.impressionslimit,
1511: a.clickslimit, a.total_clicks, a.isrevshare, m.real_name, a.adtype, a.maximpressionsperday ,
1512: a.todayimpressions, a.enddate     
1513: FROM {db_prefix}seller_ad AS a
1514: LEFT JOIN {db_prefix}members AS m ON (a.ID_MEMBER = m.ID_MEMBER)
1515: WHERE a.removed = 0
1516: ORDER BY a.ID_AD DESC
1517: LIMIT $context[start],10
1518: ");
1519: $styleClass = 'windowbg';
1520: while($row = $smcFunc['db_fetch_assoc']($dbresult))
1521: {
1522:
1523: $approvalStatus = $txt['seller_text_pending'];
1524:
1525: if ($row['approved'] == 1)
1526: $approvalStatus = $txt['seller_text_approved'];

"undefined index: Start"

however, now the app is telling me I need to update, so.... I'm just going to do that first- I need to remove the prior version first, correct?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14953
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #10 on: October 03, 2017, 03:53:12 pm »
You can update but remember you have to redo those changes we have above.

Also for the $context['start'] = (int) $_REQUEST['start'];  fix you must replace that code with the one I had above on line 1506
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #11 on: October 03, 2017, 03:58:17 pm »
hold up now- so I'm clear... just on 1506 or in every instance it appears?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14953
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #12 on: October 03, 2017, 04:02:12 pm »
just 1506
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #13 on: October 03, 2017, 04:04:14 pm »
thank you, Sir..  I'm beginning to see a trend here.. I updated from 2.0.12 through 2.0.13 to 2.0.14.. the last one while upgrading to php7 and a more robust server and SSL... I'm thinking I keep running into head-butts with another package. 

Offline drewactual

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: sql syntax error populating the error log at the rapid rate
« Reply #14 on: October 03, 2017, 04:25:34 pm »
these are still related to ad pro....

Code: [Select]
echo $tab_context['title'], '
</span>';
}
else
{
echo '
', $tab_context['title'];
}

echo '
</h3>
</div>';

// Shall we use the tabs?
if (!empty($settings['use_tabs']))
{
echo '
<p class="windowbg description">
', !empty($selected_tab['description']) ? $selected_tab['description'] : $tab_context['description'], '
</p>';


lines 291 and 303- the error's are:

Quote
Apply Filter: Only show the error messages of this URLhttps://www.xxx.com/index.php?action=admin;area=adpro;sa=reports&amp;id=54Apply Filter: Only show the errors with the same message8: Undefined index: descriptionApply Filter: Only show the errors from this file File: /home/cfb51com/public_html/Themes/default/GenericMenu.template.php
Line: 303

Quote
https://www.xxx.com/index.php?action=admin;area=adpro;sa=reports&amp;id=54Apply Filter: Only show the errors with the same message8: Undefined index: titleApply Filter: Only show the errors from this file File: /home/cfb51com/public_html/Themes/default/GenericMenu.template.php
Line: 291

I'm terribly sorry to keep beating on this... It's just I'm lost on it. 

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
8048 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
4 Replies
5183 Views
Last post September 02, 2008, 08:06:08 pm
by SMFHacks
2 Replies
3863 Views
Last post January 24, 2009, 09:28:41 am
by cepsi
1 Replies
2619 Views
Last post April 02, 2009, 09:06:46 pm
by SMFHacks
5 Replies
16690 Views
Last post January 30, 2010, 11:49:35 am
by Black Viper

+- Recent Topics

prettyurls - TroubleShooting.wiki by Rock Lee
October 10, 2019, 11:37:09 am

Some issues with adding and editing a listing by ajac63
October 07, 2019, 04:16:40 am

Problem update 1.1.21 to 2.0.15 by Rock Lee
October 06, 2019, 06:09:16 pm

[Mod]SMF 2.0.x PHP 7.2 Support by sah62
October 04, 2019, 01:46:00 pm

Ideas by shuban
October 03, 2019, 10:19:06 pm

How to space icons and multiple reacts? by shadav
October 03, 2019, 04:20:07 pm

PrettyUrls SEO Pro by Rock Lee
October 01, 2019, 09:09:38 am

How to get search preciser by SMFHacks
September 23, 2019, 10:09:56 am

How to AVOID SEO Hit when Implementing PrettyURLs by SMFHacks
September 12, 2019, 08:50:42 pm

theme by SMFHacks
September 12, 2019, 07:10:51 am

Powered by EzPortal