Forum > Support

sql syntax error populating the error log at the rapid rate

(1/4) > >>

drewactual:

--- 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
--- End quote ---

thoughts on this? 

SMFHacks:
Can you post what is on that line on the file . Doesn't' seem to matchup with my version. Post a coupleines

drewactual:

--- Code: ---// 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

--- End code ---
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

SMFHacks:
before

--- Code: ---$showRevshare = true;
2538:
2539: $resultTopic = $smcFunc['db_query']('', "

--- End code ---
Add

--- Code: ---$topic = (int) $topic;

--- End code ---

drewactual:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version