Search found 8 matches

by Gonzalos
Fri Jun 29, 2012 5:24 am
Forum: mySQL & php coding
Topic: PHP why doesn't catch error
Replies: 3
Views: 730

Re: PHP why doesn't catch error

When I call the function I send a $query which is not valid

Thanks
by Gonzalos
Thu Jun 28, 2012 10:57 pm
Forum: mySQL & php coding
Topic: PHP why doesn't catch error
Replies: 3
Views: 730

PHP why doesn't catch error

Hello I am trying to catch any error that can ocure when executes $query, but It doesn't catch the error, It just show the error on the screen, Why is that? I am using mysqli function insertField ($query){ try { $stmnt = $this->mySqli->prepare($query); $result = $stmnt->execute(); //$stmnt->close();...
by Gonzalos
Wed Jun 13, 2012 11:49 pm
Forum: mySQL & php coding
Topic: mysqli binding problem
Replies: 7
Views: 1677

Re: mysqli binding problem

Thank you very much for your answer thats clarify the problem!.
by Gonzalos
Tue Jun 12, 2012 6:14 am
Forum: mySQL & php coding
Topic: mysqli binding problem
Replies: 7
Views: 1677

Re: mysqli binding problem

Sorry It was my mistake, in my php code was fine, the misspelling was just here. Still the error that gives me is : Fatal error: Call to a member function bind_param() on a non-object In the same line $stmnt->bind_param('s', $table); If I don't use the bind_param ex: $stmnt = $mySqli->prepare("SHOW ...
by Gonzalos
Mon Jun 11, 2012 11:09 pm
Forum: mySQL & php coding
Topic: mysqli binding problem
Replies: 7
Views: 1677

Re: mysqli binding problem

I post all the classes, maybe someone can try and find out the problem: db.php <?php class baseDal { function __construct($host="", $user="", $password="", $database="") { if (empty($host) || empty($user) || empty($password) || empty($database)) { $this->host = "localhost"; $this->user = "root"; $th...
by Gonzalos
Mon Jun 11, 2012 4:54 pm
Forum: mySQL & php coding
Topic: mysqli binding problem
Replies: 7
Views: 1677

Re: mysqli binding problem

$this is correct here, If I do var_dump ($mySqli); it gives back the connection. The rest of the code does use the information that have extracted from the DB. I think this code was working fine on mysqli 5.0.92, now my server was update to mysqli 5.0.95 and most of the prepare statements does not w...
by Gonzalos
Sun Jun 10, 2012 12:11 am
Forum: mySQL & php coding
Topic: mysqli binding problem
Replies: 7
Views: 1677

mysqli binding problem

Hello I been trying to execute a query with mysqli and It gives error in the prepare line $mySqli = $this->openConnection(); $stmnt = $mySqli->prepare("SHOW COLUMNS FROM ?"); After this line I make the binding of the ? value, why is giving me error? I donĀ“t post the next part of the code because it ...
by Gonzalos
Wed May 30, 2012 6:49 am
Forum: mySQL & php coding
Topic: mySqli + prepare and bind problem
Replies: 0
Views: 379

mySqli + prepare and bind problem

Hello I move my website to a new server with PHP Version 5.3.10 and mysqli 5.0.95. In my previous server I was using mysqli 5.0.92 and was working perfectly. Now I found that when I do the binding It doesn't work. For Ex. This code it doesn't work, but in my previous server was working perfectly $my...