SQL_BindParamString Function

Binds a parameter in a prepared statement to a given string value.

void SQL_BindParamString(Handle statement, int param, const char[] value, bool copy)

Parameters

Handle statement

A statement (prepared query) Handle.

int param

The parameter index (starting from 0).

const char[] value

The string to bind.

bool copy

Whether or not SourceMod should copy the value locally if necessary. If the string contents won't change before calling SQL_Execute(), this can be set to false for optimization.

Errors

Invalid statement Handle or parameter index, or SQL error.