+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 344
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 264
Total: 264

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

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

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

Powered by EzPortal
Go to full version