This topic is locked

Additional fixed value in search

4/9/2008 12:14:33 PM
PHPRunner General questions
B
bfr author

Hi all! I'm new to this program and still going with the trial version.. probably will have to buy this, looks great <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=8095&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />
What i need to know is, that is it possibly to modify the advanced search so that it searchs for additional fixed values?
Let me demonstrate

MAKE MODEL SPAREPART PRODUCTCODE

Honda Accord Tires 1920

Honda Civic Tires 1921

Honda ANY MODEL Tires 1922

Honda Prelude Tires 1923

:
Now when user searches for "Civic" and "Tires" it should return both 1921 AND 1922 since

the latter one is for any model.. is this possible (ANY MODEL could also be replaced with empty field for example, if it makes things easier for the solution. As long as both parts are found with just searching for Civic, or just searching for Accord, you know what i mean)?

Hope it makes sense <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=8095&image=2&table=forumtopics' class='bbc_emoticon' alt=':)' />
edit: i cant get the "table" to look perfectly correct, but i hope you can read it..

Edit 2: My trial version is 4.1

J
Jane 4/10/2008

Hi,
you can add another condition editing generated include/commonfunctions.php file manually.

Locate StrWhereAdv function, find this code:

if(!($value=="null" || $value=="Null"))

$ret.=GetFullFieldName($strField).'='.$value;



and replace it with this one:

if(!($value=="null" || $value=="Null"))

{

if($strField=="Model" && $strTableName=="TableName")

{

$ret.=GetFullFieldName($strField).'='.$value . " or Model='ANY MODEL'";

}

else

$ret.=GetFullFieldName($strField).'='.$value;

}



where TableName is your actual field name.

B
bfr author 4/18/2008

Hi,

you can add another condition editing generated include/commonfunctions.php file manually.

Locate StrWhereAdv function, find this code:
and replace it with this one:
where TableName is your actual field name.


I assume that by where "TableName is your actual field name." you mean "TableName is your actual TABLE name."
Anyway, i did this but does not seem to work..

It looks correct, but for some reason it does not return the "Any model" with any other model search..
I tried to read the code, but it's bit too confusing to me..`

Maybe this code is in wrong place? maybe it is returning the "All model" results only when the "model" field is empty? Could this be the case?
edit: Now i saw the ! at the first line, i assume it means "not", so i was probably wrong with the "empty" thing.. just have to play with it a little if it starts to work..

edit2: Are all the dots and other character in their right places in this line:
.'='.$value . " or Model='ANY MODEL'";
Also, i'm using "lookupwizard" with the Models, and it is also dependant on "Make" of the car.. could these things influence this?

J
Jane 4/18/2008

Hi,
it's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

B
bfr author 4/18/2008

Hi,

it's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.


Ok, mail sent (i also bought the full version, i hope i made the right decision.. i'm quite sure i did.)