Jump to content
Larry Ullman's Book Forums

Santilal

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Santilal

  • Rank
    Newbie
  1. Hi I found the problem. I was updating a table where some values remained unchanged and flagging an error if (mysqli_stmt_affected_rows($stmt) ==1. I did not realise that mysql did not update an identical row, so that is why I was triggering an error if one row was not affected. So by removing this condition the script now works as intended. My question now is what is the best way to detect that the query has failed when using prepared statements and you know some rows will be identical. Thanks. Santilal
  2. Thanks. Yes I knew I was mixing styles and I expected that it would crash, but it didn't. I think I am only mixing styles to get the error. I only added " if(!mysqli_stmt_bind_param($stmt, 'iss', $timestamp,$umpire,$venue)); { echo "Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error;// I found this error reporting on-line - not sure if I have used it correctly.}" when I found that the bind did not appear to be working. I will change that to procedural and keep at it. Thanks for your help. Santilal
  3. Hi I am having a lot of trouble trying to get this code working. It is a mysqli UPDATE. The values in the database are not changing. I have tries to trap the error but it doesn't provide anything meaningful - at least for me. The date and time are entered as form data. After validation, a timestamp is created. The time can be submitted in two formats, so I had to make sure both formats could be resolved to form the timestamp. The time stamp is then passed to the database and this is the part that's not working. Here is the error message: Binding parameters failed: (
  4. Hi I am a complete newbie with js and I am struggling with OOP ass well. I can't get my head around how login.php is blocked if the js validation fails. I can see that the js will return FALSE, but how does this stop the form being submited by the php script? I hope this question makes sense. Thanks and kind regards, Santilal
  5. Hello, I have finally through trial and error got this code to work. You see I misunderstood that the absolute path had to be specified starting from the drive. So when I changed the code to: define ('MYSQLI', 'c:\\xampp5519\htdocs\mms\mysqli_connect.php'); it ran fine. This is fine for testing as I am developing and testing my code on an xampp server running on my laptop, so I know what the absolute path is. But what happens when I make my website live on a server hosted by a webhost. How will I find out what the absolute path is? Is this something webhosts make freely av
  6. Hi I am running XXAMP server on a Windows 7 machine. I am trying to get the register.php working but I keep getting the error An error occurred in script 'C:\xampp5519\htdocs\mms\register.php' on line 10: require(/localhost/mms/mysqli_connect.php): failed to open stream: No such file or directory. This is the path I have set up in config.inc.php define ('MYSQLI', '/localhost/mms/mysqli_connect.php'); I presume I have wrongly specified the path name, but it looks right to me. The files are stored at c:\xxamp5519\htdocs\mms\mysqli_connect.php I am hoping it is something o
×
×
  • Create New...