Thread: Mys 1.3.4 Alchemy Mod
View Single Post
  #54  
Old 11-13-2015, 02:37 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 395,510
Hall of Famer is on a distinguished road
Default

You are very welcome, I am glad I can help. You can also try SQL IN clause, so you will get rid of the OR operators. However, you will need to compare each user input, ie. $mysidia->input->post("item"), and $mysidia->input->post("item2") so that your users wont enter the same item for item1, item2, etc. Here is an example for two items SQL:

Code:
$items = "({$mysidia->input->post('item')}, {$mysidia->input->post('item2')})";
$whereClause = "(item IN {$items} and item2 IN $items)";  
Read the below tutorial on w3schools, and it will help:
http://www.w3schools.com/sql/sql_in.asp
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote