Dynadot โ€” .com Transfer

Help with PHP concept

SpaceshipSpaceship
Watch

Waeggles

Established Member
Impact
2
Hello all,

A client has requested something that to me sounds like a simplistic expert system. He wants me to develop a system that can take certain properties that the user enters and based on those selections recommend a product.
I have given this some thought, and I figure that using some kind of tagging system might be appropriate? I.E. I would assign certain properties to certain products, and based on the users selections (through checkboxes probably), products matching those selections would show up.
Does anyone have any experience building something similar? Any examples? Am I on the right track?

Thanks a lot.

Jonas
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
It is simple math.

Lets say you have these options. They form a sort of dichotomous key (2 options)
For example

1.
a) Do you have Windows? Go to 2.
b) Do you have Mac? Go to 5.
2.
a) Do you have a keyboard? Go to 3.
b) Do you have a microsoft keyboard? Go to 4.
3.
a) New keyboard? XXLGS
b) Used keyboard? Used XXLGS
4.
a) New keyboard? Microsoft KKGJHD
b) Used keyboard? Microsoft FKsjfdjs Used
5.
a) New keyboard? Apple Mac Keyboard
b) Used Keyboard? used Apple Keyboard

Using a simple array structure of 1s and 0s down to what it could be you can do it. Yes being 1 and No being 0. With simple questions that narrow down to the answer.

First thing you need to do is define a simple array of questions, and possible answers. Put them into a sort of dichotomous key (structured tree type system) and than put into a mysql or php as a simple array with multiple dimensions
http://www.desilva.biz/arrays/multidimen.html

Something like

$array['0']['1']['0']['0']['1']['1'];
And that will say for example "Used Microsoft keyboard"

That is one of the many ways to do it. If you want another way just ask.

- Steve
 
0
•••
Using a tagging system would also work, yes the owner could just define a few tags like fried, chicken, sauce and it could search for any products with one or more of those tags using MySQL. You could also let it search through descriptions and titles.

Code:
SELECT * FROM `products` WHERE `title` LIKE '%$search%' OR `description LIKE '%$search%' OR `tags` LIKE '%$search%' ORDER BY `id`

That is just purely an example, do not use that query as it is :)
 
0
•••
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back