homepage Welcome to WebmasterWorld Guest from 54.211.180.175
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Set mysql value to a php variable
nimonogi




msg:4544104
 10:56 am on Feb 9, 2013 (gmt 0)

Hello,

I want to set php variable "$vatnumber" with the value "IT123456789" from the following mysql database.

Table: invoicedata
Column: customfields / Value:
a:1:{i:0;a:3:{s:2:"id";s:1:"7";s:9:"fieldname";s:3:"VAT";s:5:"value";s:13:"IT123456789";}}

Value "IT123456789" doesn't have always the same letters and numbers nor the same number of digits.

$vatnumber = $data["VAT"]; It's not working..

How can i do that?

Thanks!

 

swa66




msg:4544122
 12:14 pm on Feb 9, 2013 (gmt 0)

Seeing more and more of this kind of what I consider abuse of databases: storing arrays in serialized form instead of using the the database to allow it to work with the data.

Did you unserialize the string back into an array ?
[php.net...]

nimonogi




msg:4544144
 2:11 pm on Feb 9, 2013 (gmt 0)

No. I'm not sure if i can do that since my script is encoded with ioncube.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved