cljones81 Posted March 22, 2008 Share Posted March 22, 2008 Hello: I wonder if some could help me with this problem: I've created this form to construct their own fairly advanced dynamic queries using field names, keywords, query expressions AND, OR. Everything is fine if the user constructs the largest query size available e.g. Select * from table where fieldname1 = keyword1 AND fieldname2 = keyword2 OR fieldname3 = keyword3 AND fieldname4 = keyword4. The problem comes when you try and create a shorter query even with the unused fields set to their null values, the error, mysql_num_rows(): supplied argument is not a valid MySQL result resource appears. My question is this is there any way that you could get it to ignore the empty fields and just construct and process a query based on the fields filled in using php? Link to comment https://forums.phpfreaks.com/topic/97391-dynamic-query-creation/ Share on other sites More sharing options...
cooldude832 Posted March 22, 2008 Share Posted March 22, 2008 it be great if we could have a glimpse at this super high tech dynamic query code you are talking about Link to comment https://forums.phpfreaks.com/topic/97391-dynamic-query-creation/#findComment-498361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.