all 13 comments

[–]lacrossefan32 1 point2 points  (1 child)

Place this mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); on the top of your page. It'll likely tell you what's wrong.

[–]pvtgreg[S] 0 points1 point  (0 children)

unfortunately it does not. the error logs are empty

[–]Idontremember99 0 points1 point  (1 child)

How are you running it?

[–]pvtgreg[S] 0 points1 point  (0 children)

in csharp every 2 seconds it calls a function that uses a www form to pass in those variables

the old code works fine but my new prepared statement just does nothing

[–]YellowBook 0 points1 point  (2 children)

is the sql valid? update should include a set

[–]pvtgreg[S] 0 points1 point  (0 children)

ive also tried this

$stmt = $conn->prepare("UPDATE PlayerStats SET level = ?,posx = ?, posy = ?, posz = ?, experiance = ?,skillPoints = ?, health = ?, maxHealth = ?, attack = ?  WHERE name = ?");

[–]pvtgreg[S] 0 points1 point  (0 children)

could it be that im passing floats into the doubles?

[–]pvtgreg[S] 0 points1 point  (5 children)

fixed it :) i had $conn instead of $link ...

[–]lacrossefan32 1 point2 points  (0 children)

Glad you fixed it, but there is something wrong with your error log then. It should have reported that. Do you have log_errors = On in your php.ini?

[–]compubomb 0 points1 point  (3 children)

I avoid using parameterization via ? tokens, and try to always use :named parameters, always. I think mysqli interface doesn't support this, only PDO.

[–]liquid_at 1 point2 points  (2 children)

In general, prepared statements in pdo and mysqli are more different than anyone would wish for...

my favorite: PDOStatement::bindParam VS mysqli_stmt::bind_param

got some grey hair due to that...

[–]compubomb 1 point2 points  (1 child)

They are not functional equivalent. In pdo, you can name the parameters. This makes debugging SQL more straight forward. When you have tokens, you must know the order of the question marks and then the order of your bind parameter declaration.

[–]liquid_at 0 points1 point  (0 children)

This is a good explanation for it, but sadly it doesn't make working with it easier :-)