Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 202
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 168
Total: 168

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

0 Members and 1 Guest are viewing this topic.

Offline drewactual

  • Member
  • *
  • 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: 16436
    • 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

  • Member
  • *
  • 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: 16436
    • 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

  • Member
  • *
  • 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

  • Member
  • *
  • 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

  • Member
  • *
  • 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: 16436
    • 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

  • Member
  • *
  • 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

  • Member
  • *
  • 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: 16436
    • 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

  • Member
  • *
  • 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: 16436
    • 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

  • Member
  • *
  • 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

  • Member
  • *
  • 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
11568 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
4 Replies
32099 Views
Last post September 02, 2008, 08:06:08 pm
by SMFHacks
2 Replies
7914 Views
Last post January 24, 2009, 09:28:41 am
by cepsi
1 Replies
4032 Views
Last post April 02, 2009, 09:06:46 pm
by SMFHacks
5 Replies
20848 Views
Last post January 30, 2010, 11:49:35 am
by Black Viper

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal