Using PDO & SQL Server 2008

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
J39L4753
Forum Newbie
Posts: 5
Joined: Sun Jan 19, 2014 2:52 pm

Using PDO & SQL Server 2008

Post by J39L4753 »

Hi, this is my first post here...

I've started to use PDO in my latest project, it's different coding from what I've done previously.

I have a registration form which the user inputs relevant details to register on the site. This seems to connect to the SQL Server database, run through all the code, tell the user the details have been added. When I check the database there are no records input. Why would this be, I have checked the generated SQL string manually and it will insert the record. I have also done a simple connection and select * from table to check what records are in the table, that works ok and returns all records.

I just can't see why it doesnt insert.

Attached is a copy of the site to make it eaiser for people to see what I have
Attachments
devdb.zip
(11.13 KiB) Downloaded 31 times
J39L4753
Forum Newbie
Posts: 5
Joined: Sun Jan 19, 2014 2:52 pm

Re: Using PDO & SQL Server 2008

Post by J39L4753 »

In SQL Server using hash & salt what field type in the table should the salt be, varchar, char or binary?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Using PDO & SQL Server 2008

Post by requinix »

Assuming your salt is not binary then probably char (salts tend to be the same length) or varchar (if they're not). If it is binary then, well, [var]binary.

I take it you've narrowed down the problem to be something relating to the field type for the salt?
J39L4753
Forum Newbie
Posts: 5
Joined: Sun Jan 19, 2014 2:52 pm

Re: Using PDO & SQL Server 2008

Post by J39L4753 »

requinix wrote:Assuming your salt is not binary then probably char (salts tend to be the same length) or varchar (if they're not). If it is binary then, well, [var]binary.

I take it you've narrowed down the problem to be something relating to the field type for the salt?
Thanks I'll try that...

I haven't 100% narrowed it down to the problem of field type within the database, I'm trying to think of everything and cross it off the list. At the moment apart from this I'm not sure what else it could be. This is why I attached a copy of the site to see if anyone looking at the code can spot the issue
Post Reply