Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/49838-solved-decoding/
Share on other sites

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>";

 

Link to comment
https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244579
Share on other sites

`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

Link to comment
https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244585
Share on other sites

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.

 

 

Link to comment
https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244593
Share on other sites

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!

Link to comment
https://forums.phpfreaks.com/topic/49838-solved-decoding/#findComment-244607
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.