jakebur01 Posted May 3, 2007 Share Posted May 3, 2007 I have a column in my mysql table that has ########0 in all of its fields. How to I get whats in these fields? How do I decode this using php? P.S. The data originally came out of a mssql database. I now have all of the data in a mysql database and I am using php. Thanks, `Jake Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/ Share on other sites More sharing options...
suttercain Posted May 3, 2007 Share Posted May 3, 2007 What is that field set as? Text, Varchar, Int, etc... Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244484 Share on other sites More sharing options...
jakebur01 Posted May 3, 2007 Author Share Posted May 3, 2007 (char(10),not null) Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244489 Share on other sites More sharing options...
jakebur01 Posted May 3, 2007 Author Share Posted May 3, 2007 Varchar 10 Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244499 Share on other sites More sharing options...
jakebur01 Posted May 3, 2007 Author Share Posted May 3, 2007 Any ideas on what I could do on this? Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244564 Share on other sites More sharing options...
Trium918 Posted May 3, 2007 Share Posted May 3, 2007 Where is the code that you are using that is inserting the data? Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244572 Share on other sites More sharing options...
jakebur01 Posted May 3, 2007 Author Share Posted May 3, 2007 I am retrieving the data: CfMask is the column that returns ########0 . I have 80,000 rows of products. I just need to decode this one column somehow. $result=mysql_query("SELECT No, Descn1, CfMask, VendorNo, VendorItemNo, ListPrice ". "FROM item ". "limit $offset,$limit"); ?> <TABLE width=100% BORDER=1 CELLSPACING=0 CELLPADDING=5 ALIGN=center > <?php while ($myrow=mysql_fetch_array($result)) { echo"<tr><TD WIDTH=133><p class=foot><small>"; echo$myrow["No"]; echo"</small></p></td><TD WIDTH=133><p class=foot><small>"; echo$myrow["Descn1"]; echo"</small></p></td><TD WIDTH=133><p class=foot><small>"; echo$myrow["CfMask"]; echo"</small></p></td><TD WIDTH=133><p class=foot><small>"; echo$myrow["VendorNo"]; echo"</small></p></td><TD WIDTH=133><p class=foot><small>"; echo$myrow["VendorItemNo"]; echo"</small></p></td><TD WIDTH=133><p class=foot><small>"; echo$myrow["ListPrice"]; echo"</small></p></td>"; echo"</tr>"; } echo "</table>"; Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244579 Share on other sites More sharing options...
Trium918 Posted May 3, 2007 Share Posted May 3, 2007 Ok, but where is the code that is inserting the data? That code is pulling from the database. Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244582 Share on other sites More sharing options...
jakebur01 Posted May 3, 2007 Author Share Posted May 3, 2007 `CommerceInsight_dbo` CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `CommerceInsight_dbo`; -- ------------------------------------- -- Tables DROP TABLE IF EXISTS `CommerceInsight_dbo`.`Item`; CREATE TABLE `CommerceInsight_dbo`.`Item` ( `CompanyNo` CHAR(2) NOT NULL, `No` CHAR(20) NOT NULL, `Descn1` VARCHAR(30) NOT NULL, `Descn2` VARCHAR(30) NOT NULL, `ItemClassCode` CHAR(3) NOT NULL, `SeqNo` VARCHAR(5) NOT NULL, `UomSmallest` CHAR(2) NOT NULL, `Uom2` CHAR(2) NOT NULL, `Uom3` CHAR(2) NOT NULL, `UomSt` CHAR(2) NOT NULL, `UomPr` CHAR(2) NOT NULL, `UomSl` CHAR(2) NOT NULL, `UomCt` CHAR(2) NOT NULL, `UomBy` CHAR(2) NOT NULL, `Cf2Sm` CHAR(10) NOT NULL, `Cf3Sm` CHAR(10) NOT NULL, `Alpha` CHAR(10) NOT NULL, `StdPack` INT(10) NOT NULL, `ManualCost` DECIMAL(19, 4) NOT NULL, `ManualCostBasis` CHAR(1) NOT NULL, `ManualCostMultiplier` DECIMAL(8, 3) NOT NULL, `CfMask` CHAR(10) NOT NULL, `GlTable` CHAR(3) NOT NULL, `VendorNo` CHAR(10) NOT NULL, `VendorItemNo` VARCHAR(30) NOT NULL, `DateLastSale` DATETIME NOT NULL, `DateLastPurchase` DATETIME NOT NULL, `DateLastPrice` DATETIME NOT NULL, `DateLastCost` DATETIME NOT NULL, `DateEstablished` DATETIME NOT NULL, `Taxable` CHAR(1) NOT NULL, `UpdateInventory` CHAR(1) NOT NULL, `SerialLots` CHAR(1) NOT NULL, `MiscSales` CHAR(1) NOT NULL, `ManufacturedItem` CHAR(1) NOT NULL, `Active` CHAR(1) NOT NULL, `MultipleUom` CHAR(1) NOT NULL, `DfltPrices` CHAR(1) NOT NULL, `WeightUom1` DECIMAL(18, 0) NOT NULL, `WeightUom2` DECIMAL(18, 0) NOT NULL, `WeightUom3` DECIMAL(18, 0) NOT NULL, `FreightClass` CHAR(3) NOT NULL, `MsdsId` CHAR(20) NOT NULL, `StdComm` DECIMAL(5, 3) NOT NULL, `SubItem1` CHAR(20) NOT NULL, `SubItem2` CHAR(20) NOT NULL, `SubItem3` CHAR(20) NOT NULL, `NotUsed2` VARCHAR(15) NOT NULL, `ModelNo` CHAR(15) NOT NULL, `DotCode` CHAR(6) NOT NULL, `ItemPriceClassCode` CHAR(3) NOT NULL, `ListPrice` DECIMAL(19, 4) NOT NULL, `Service` CHAR(1) NOT NULL, `MeteredItem` CHAR(1) NOT NULL, `Uom_Meter` CHAR(2) NOT NULL, `Track` CHAR(1) NOT NULL, `NotUsed1` CHAR(5) NOT NULL, `ModelCode` CHAR(15) NOT NULL, `SalesSvrItem` CHAR(20) NOT NULL, `PricingType` CHAR(1) NOT NULL, `PartsWtyDays` CHAR(4) NOT NULL, `LaborWtyDays` CHAR(4) NOT NULL, `Fltr` TINYINT(1) NOT NULL, `Icmun1` VARCHAR(1) NOT NULL, `Icmun2` VARCHAR(1) NOT NULL, `Icmun3` VARCHAR(1) NOT NULL, `Icmun4` VARCHAR(1) NOT NULL, `Icmun5` VARCHAR(1) NOT NULL, `Udf1` VARCHAR(50) NOT NULL, `Udf2` VARCHAR(50) NOT NULL, `Udf3` VARCHAR(50) NOT NULL, `Udf4` VARCHAR(50) NOT NULL, `Udf5` VARCHAR(50) NOT NULL, `TS` TIMESTAMP NOT NULL, `rowguid` VARCHAR(64) NOT NULL, PRIMARY KEY (`CompanyNo`, `No`), INDEX `IX_Item_Alpha` (`CompanyNo`, `Alpha`), INDEX `IX_Item_ClassCode` (`CompanyNo`, `ItemClassCode`), INDEX `IX_Item_ModelNumber` (`CompanyNo`, `ModelNo`), INDEX `IX_Item_MsdsId` (`CompanyNo`, `MsdsId`), INDEX `IX_Item_SearchNoDescn1` (`CompanyNo`, `No`, `Descn1`), INDEX `IX_Item_VendorItemNo` (`CompanyNo`, `VendorItemNo`), INDEX `IX_Item_VendorNo` (`CompanyNo`, `VendorNo`), INDEX `IX_Item_VendorNo_ClassCode` (`CompanyNo`, `VendorNo`, `ItemClassCode`) ) ENGINE = INNODB; SET FOREIGN_KEY_CHECKS = 1; -- ---------------------------------------------------------------------- -- EOF Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244585 Share on other sites More sharing options...
MadTechie Posted May 3, 2007 Share Posted May 3, 2007 how is this even a decoding issule! you haven't shown anything to do with encoding except charsets! Edit: as a side note use THE EDIT button Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244587 Share on other sites More sharing options...
Trium918 Posted May 3, 2007 Share Posted May 3, 2007 This is what I am looking for!! <?php // if ok, put in db $result = mysql_query("INSERT INTO members_info ('column1','column2','column3' ) VALUES('value1','value2 ','value3') "); ?> Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244589 Share on other sites More sharing options...
jakebur01 Posted May 3, 2007 Author Share Posted May 3, 2007 There is another website that is connected to this database. The site was created by a big company using asp. I have gone through miles of asp code looking for this and have not found it. I am using this table so I can use all of the products. I am looking for the quanity column. I am think this is it that is encoded. I was hoping maybe their are a few different functions I could try to decode this to get the info out of my fields. Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244593 Share on other sites More sharing options...
MadTechie Posted May 3, 2007 Share Posted May 3, 2007 how much do you know about the project ? you seam to be missing a few details ie ########0 could just be the formatting ie ########0 = zero #####1.10 = 1.10 etc ! its displays # then thats what set if your getting weird chars then thats a different issule! Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244607 Share on other sites More sharing options...
jakebur01 Posted May 3, 2007 Author Share Posted May 3, 2007 Thanks for you time and help. I'm learnin. `Jake Quote Link to comment https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244609 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.