problems with MySQL, PHP, INSERT METHOD.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

CilVine

Thread Starter
Joined
Apr 7, 2013
Messages
48
Just one more thing, Jim: The inserts, and update methods work alongside the 'query' method. So, you may need to check this out, as well. In fact, the database class that I included the first time round, pretty much uses the 'query', 'error', and __construct methods regularly throughout.
 

JiminSA

Jim
Joined
Dec 15, 2011
Messages
3,407
There is a difference between the insert and the update code submitted to getInstance() ...
Insert passes 2 parameters and Update passes 3 (the record key is included).
Perhaps if you cater for the 3rd parameter with a double comma (i.e. empty) it may have a positive affect ...
Code:
$user = DB::getInstance()->insert('users', array( .......
becomes
$user = DB::getInstance()->insert('users',, array(
 

CilVine

Thread Starter
Joined
Apr 7, 2013
Messages
48
Yes, the Update method requires the id number, which is the reason why that method has an extra key.

However, the insert method requires 2 arguments.

Having tried your suggestion, I get a Syntax error in return.
 

JiminSA

Jim
Joined
Dec 15, 2011
Messages
3,407
Worth a try though as I'm running short on ideas for a solution. But let's not give up!
 

CilVine

Thread Starter
Joined
Apr 7, 2013
Messages
48
Okay Jim. I will continue to tug away at it, and post any developments. Hadn't worked on this problem as much, over the last few days, because of my problem with session variables.
 

CilVine

Thread Starter
Joined
Apr 7, 2013
Messages
48
Nonetheless, Just to be more precise, the problem is actually solved. The whole point was that of finding a way of getting the insert method to insert rows into the database. we have solved that problem. However, the problem of applying the extra security measure is the remaining problem.

You have helped me to think with a little more perspective, though.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top