Raised This Month: $ Target: $400
 0% 

Solved Broken table when supposed to work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-28-2021 , 20:35   Re: Broken table when supposed to work
Reply With Quote #1

1. You have no </td>'s or </tr>'s
2. You can eliminate the SQL_FieldNameToNum() native calls by passing the column number directly to SQL_ReadResult().
3. You can replace formatex() with copy() on your first 5 formatex()'s.

Try this
PHP Code:
        while (SQL_MoreResults(Query))
        {
            
len += formatex(gMotd[len], charsmax(gMotd) - len"<tr><td>%d</td>", ++k);
            
            
SQL_ReadResult(QueryiName szNamecharsmax(szName));
            
            
len += formatex(gMotd[len], charsmax(gMotd) - len"<td>%-22.22s</td>"szName);
            
len += formatex(gMotd[len], charsmax(gMotd) - len"<td>%d</td>"SQL_ReadResult(QueryiKills ));
            
len += formatex(gMotd[len], charsmax(gMotd) - len"<td>%d</td>"SQL_ReadResult(QueryiDeaths ));
            
len += formatex(gMotd[len], charsmax(gMotd) - len"<td>%d</td></tr>"SQL_ReadResult(QueryiHeadshots ));
    
            
SQL_NextRow(Query);
        } 
__________________

Last edited by Bugsy; 09-28-2021 at 20:45.
Bugsy is offline
Reply



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 20:26.


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