well, you said any help, so here it is
I don't know mysqli....I don't even remember mysql_query() becuase it was mindnumbing drudgery to use it.
Here is the example from php.net -- you have to pass in a string parameter w/ characters indicating the data types of the values to be bound to each place-holder ? in query, then all of the values. Reminds me of sprintf() or printf():
$stmt = mysqli_prepare($link, "INSERT INTO CountryLanguage VALUES (?, ?, ?, ?)");
mysqli_stmt_bind_param($stmt, 'sssd', $code, $language, $official, $percent);
Here is an example using PDO, this is the type of interface I prefer:
$pdo = new PDO($yourConnectionDsn, $user, $password);
$stmt = $pdo->prepare("UPDATE table a SET field1 = ? , field3 = ?");
// here you pass an ordered array of values
$stmt->execute(array($valueForField1, $valueForField2));
The trick is the order of values in the array you use in execute() call must match ordering of fields given in the prepare statement. Having said that, its pretty easy once you get used to it.
The cool thing with PDO is you can set an attribute to throw exceptions rather than have to check for errors every time you do a query. Then you can nest your querries in try/catch blocks, or let the exceptions bubble up to some other handler in the application. Maybe you can do that w/ mysqli too, I don't know.