How to bind values for ssp.class.php $whereAll

How to bind values for ssp.class.php $whereAll

sammyblackbaronsammyblackbaron Posts: 8Questions: 2Answers: 0

I am using the complex method of the SSP class for server-side processing. I would like to use the $whereAll parameter to restrict the number of results but want to bind the value to protect against sql injection.

Can anyone help me with how I pass bindings using the $whereAll parameter please? I can't get my head around how I would go about this...

Many thanks

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    The SSP class isn't fully documented as its just a demo script intended for use with the examples. As such, if you want to make use of the script for other reasons it is necessary to dig through the code a bit, and it might also be that it doesn't do exactly what you need without modification.

    In this case what you'll need to do is use the static bind method which will return a string key which you and insert into your WHERE condition. The script will then fill in the bindings when you execute it.

    Allan

  • sammyblackbaronsammyblackbaron Posts: 8Questions: 2Answers: 0

    Got it working, many thanks for taking the time to come back to me Allan

This discussion has been closed.