How do i serlialize the product using php?

Posted by Ibrahim Azhar Armar on Stack Overflow See other posts from Stack Overflow or by Ibrahim Azhar Armar
Published on 2011-01-07T08:46:28Z Indexed on 2011/01/07 8:54 UTC
Read the original article Hit count: 254

Filed under:
|

hi,

i am building a real estate application where in it will store the properties and search it. the property will have different categories like (residential, commercial, industrial or agricultural). based upon the category i want to serailize each and every property listing . for example the property with id 1 belongs to resedential will have the serial code rs_SOMERANDOMUNIQUENUMBER. and for commercial it can be cm_SOMERANDOMUNIQUENUMBER and so on. for this my database table looks like this.

CREATE TABLE IF NOT EXISTS `propSerials` (
`id` bigint(20) NOT NULL auto_increment,
`serial` varchar(50) NOT NULL,
`property_id` int(10) UNIQUE NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

what would be the best possible format to store the serial with the prefix according to category?

thank you

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql