EchoFool Posted March 11, 2010 Share Posted March 11, 2010 Hey, Quick question - how would i do php functions against a table field without having to grab the value from the table put it into a variable in php and then execute? I want to do some thing like: WHERE in_array('FieldName',$Array) ORDER BY But I do not know the syntax to do it =/ Can any one help please Link to comment https://forums.phpfreaks.com/topic/194869-php-function-against-a-table-field/ Share on other sites More sharing options...
jl5501 Posted March 11, 2010 Share Posted March 11, 2010 you need to be a lot clearer with what you are trying to achieve. What you have posted does not give much chance for you to get a meaningful answer Link to comment https://forums.phpfreaks.com/topic/194869-php-function-against-a-table-field/#findComment-1024630 Share on other sites More sharing options...
trq Posted March 11, 2010 Share Posted March 11, 2010 You can easily achieve what you have posted by using mysql's IN statement. $sql .= "WHERE FeildName IN('" . implode("','", $Array) . "') ORDER BY"; Link to comment https://forums.phpfreaks.com/topic/194869-php-function-against-a-table-field/#findComment-1024633 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.