Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:31:22+00:00 2026-06-08T08:31:22+00:00

I have to use all this and display all of them SELECT CONVERT(INT,cast(reverse(substring(char_data, 263,

  • 0

I have to use all this and display all of them

SELECT CONVERT(INT,cast(reverse(substring(char_data, 263, 2)) as BINARY(2))) FROM CHAR_DATA0 AS strength
SELECT CONVERT(INT,cast(reverse(substring(char_data, 265, 2)) as BINARY(2))) FROM CHAR_DATA0 AS wisdom
SELECT CONVERT(INT,cast(reverse(substring(char_data, 267, 2)) as BINARY(2))) FROM CHAR_DATA0 AS dexterity
SELECT CONVERT(INT,cast(reverse(substring(char_data, 269, 2)) as BINARY(2))) FROM CHAR_DATA0 AS charisma
SELECT CONVERT(INT,cast(reverse(substring(char_data, 271, 2)) as BINARY(2))) FROM CHAR_DATA0 AS intelligence
SELECT CONVERT(INT,cast(reverse(substring(char_data, 273, 2)) as BINARY(2))) FROM CHAR_DATA0 AS constitution

This is my PHP code so far,
I tried adding another SQL query with the same variable $result so it can also be used on the fetch for $results, but I’m not getting any though.

// USING TOP for TEST
$SQL = "SELECT TOP 10 CONVERT(INT,cast(reverse(substring(char_data, 263, 2)) as BINARY(2))) FROM CHAR_DATA0 AS strength";

// Execute query:
$result = mssql_query($SQL) 
    or die('A error occured: ' . mysql_error());
    echo "<table border='1'>
     <tr>
       <th>STR</th>
       <th>WIS</th>
       <th>DEX</th>
       <th>CHA</th>
       <th>INT</th>
       <th>CON</th>
     </tr>";

// Fetch rows:
while ($row = mssql_fetch_assoc($result)) {
     echo "<tr>";
     echo "<td>" . $row['strength'] . "</td>";
     echo "<td>" . $row['wisdom'] . "</td>";
     echo "<td>" . $row['dexterity'] . "</td>";
     echo "<td>" . $row['charisma'] . "</td>";
     echo "<td>" . $row['intelligence'] . "</td>";
     echo "<td>" . $row['constitution'] . "</td>";
     echo "</tr>";  
    }

Any advice, solution? I’m new at this. Thank you.

————————————————EDIT:
Anyways, how do I sort like this?

SELECT CONVERT(INT,cast(reverse(substring(char_data, 263, 2)) as BINARY(2))) FROM CHAR_DATA0 AS strength SORT BY char_key WHERE CONVERT(INT, substring(char_data, 261, 1))=0x00 AS permission
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:31:24+00:00Added an answer on June 8, 2026 at 8:31 am

    You are doing 6 different sql queries atm. So you’d have to do 6 mysql_query and mysql_fetch_assoc in your code.
    Just do a single query:

    SELECT
        CONVERT(INT,cast(reverse(substring(char_data, 263, 2)) as BINARY(2))) AS strength,
        CONVERT(INT,cast(reverse(substring(char_data, 265, 2)) as BINARY(2))) AS wisdom,
        CONVERT(INT,cast(reverse(substring(char_data, 267, 2)) as BINARY(2))) AS dexterity,
        CONVERT(INT,cast(reverse(substring(char_data, 269, 2)) as BINARY(2))) AS charisma,
        CONVERT(INT,cast(reverse(substring(char_data, 271, 2)) as BINARY(2))) AS intelligence,
        CONVERT(INT,cast(reverse(substring(char_data, 273, 2)) as BINARY(2))) AS constitution
    FROM CHAR_DATA0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class called HeaderView which I use all over my application: public
I have added a JavaScript Interface to WebView. I am able to use all
I have a few iFrames that all use a single background image. Whenever I
I want all my pages to use have some viewdata. i need to get
We have a Library Project that we use for all our central reused code
I have custom event that has several different subscribers who will all use the
I have created a custom theme for my activities that they all use. In
In my Android application I have to use common string value for all activities.
I have seen n-tiers solutions on the web, they all use DLLs for each
When I first started reading about Python, all of the tutorials have you use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.