Raised This Month: $ Target: $400
 0% 

mathematical and SQL question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-05-2007 , 10:52   Re: mathematical and SQL question
Reply With Quote #2

The maths looks like it should be right ..

The SQLX snippet for that select is basically:
PHP Code:
query_handle SQL_PrepareQuery(connection_handle,"INSERT INTO '%s_bans' 
('ip', 'authid', 'name', 'created', 'ends', 'length', 'reason', 'aid', 'adminIp', 'sid')
VALUES (
'%s',
'%s',
\"%s\",
UNIX_TIMESTAMP(),
UNIX_TIMESTAMP() + %d,
'%d', '%s', 
(SELECT 'aid' FROM '%s_admins' WHERE 'authid' = '%s'),
'%s',
(SELECT 'sid' FROM '%s_servers' WHERE 'ip' = '%s' AND 'port' = '%s' LIMIT 0,1))"
DatabasePrefixIpAuthidName, (time*60), (time*60), ReasonDatabasePrefixAdminAuthidAdminIpDatabasePrefixServerIpServerPort) ; 
(The linebreaks are to add a tiny bit of readability ... but should be fine left in)
purple_pixie is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode