98 Topics

Member Avatar for
Member Avatar for extjac

Hello, i have this code to the insert: class test { function __construct() { $this->table = 'testtable'; } public function insert($values = array() ) { foreach ($values as $field => $v) { $data[] = ':' . $field; } $data = implode(',', $data); $fields = implode(',', array_keys($values)); $sql = " INSERT …

Member Avatar for cereal
0
120
Member Avatar for extjac

Hello, i wanted to know what you guys use with PDO. Do you use ->fetchAll() or ->fetch() + while based on some reading i have done, it seems that PDO->fetchAll() is faster but uses more momory...

Member Avatar for pritaeas
0
201
Member Avatar for reggie.dipo

Hi, I'm new to php and i'm trying to build simple database and I having a problem with getting id value with $_GET here is snippet of my code: $id = (int)$_GET['id']; echo $id; if(isset($_POST['upd'])){ $sql = "UPDATE dvds SET title = ?, folder = ?, spot = ? WHERE …

Member Avatar for broj1
0
106
Member Avatar for phplover

Hi, When a user registers on my site there status is 0 (not active) ... meaning they not activated there account via email. When they register i also store the DATETIME they registered, i store it in MySQL using MySQL DATETIME and using `NOW()` in my INSERT query on registration. …

Member Avatar for phplover
0
3K
Member Avatar for phplover

Hello, Can someoneone tell me when you `prepare()` a statement (in my case an update statement) and then `execute()` it, i then check using `rowCount()` after the update query (see code below) if `rowCount() > 0` if it is then a match was found and update took place, but i …

Member Avatar for phplover
0
192
Member Avatar for gorleone

Hi Guys, I have a 2 errors with PDO: Sometimes give me this error: Connection error, because: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111 Other time sent me this: SQLSTATE[42000] [1203] User [MYUSERNAME] already has more than 'max_user_connections' active connections This is …

Member Avatar for gorleone
0
143
Member Avatar for tyop

This is something that worked a few months ago and now I don't know what I messed up when I made the mistake of trying to migrate it to a new host. It's nothing but a registration and login module and I'm trying to have a tight focus on security …

Member Avatar for tyop
0
3K
Member Avatar for phplover

Hi, I have gone over and over the subject and still confused. I currently develop in PHP 5.2.x along with MySQL. (awaiting host to upgrade to 5.3.x, hopefully not to long although on local i develop using php 5.3.5) Currently i use the standard MySQL functions in PHP like: [B]mysql_connect()[/B],[B] …

Member Avatar for phplover
0
156

The End.