PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 31st, 1999, 03:44 AM
davidn
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I'm not sure how to handle this one, and I've tried what to me are the most obvious solutions, but so far none have proved entirely satisfactory. I must be overlooking something very simple, since it isn't mentioned in any literature on PHP that I've researched.

I have a value which is essentially a bitmask although a little more complex. Perhaps a better description would be "encoded value". I store this in a field in a mysql database, but the problem I have is that I need to edit it. It is broken apart, and converted to various html widgets within the application, reassembled and submitted via an sql update to the database.

The problem occurs when (this is a 32 bit machine - an intel PII) the 'sign' bit is set in the encoding process. I can't find any way of printing the UNSIGNED value of this bit - whether I print in hexadecimal (which I would have thought to always assume it is an unsigned quantity by default) or decimal, I can't seem to do it. But I need to find a way so that it will successfully update.

I'm starting to think the best way to handle this is by using functions from the sql interpreter, but I'm worried that if I do, I'll make my code (which uses phplib-7) less database 'portable'.

Any thoughts or comments welcome, either by email or here.


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Unsigned integers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway