[eluser]Las3r[/eluser]
BUSTED!
I had one of the columns in the table set as ntext in stead of text, this screwed up the CI class (i found it out by using the manual connection + query).
Thank you!
Now there's 1 thing left.
Since I'm trying to code clean with the use of MCV, could you explain what is best practise when it comes to for example my ticket system?
Step 1)
Controller loads model that fetches all tickets for the logged in user
Step 2)
Model queries for information, HOW do I pass this back to the controller ? I'm currently using return $result; , however when I try to echo the result I am expecting "Array" in stead of
Quote:A PHP Error was encountered
Severity: 4096
Message: Object of class CI_DB_mssql_result could not be converted to string
Filename: models/support_functions.php
Line Number: 44
My SQL table layout is as following:
Quote:CREATE TABLE [dbo].[support_tickets](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Sender] [varchar](10) NOT NULL,
[Category] [nchar](25) NOT NULL,
[ticket_title] [varchar](15) NOT NULL,
[Ticket_Contents] [text] NOT NULL,
[Date] [datetime] NOT NULL,
[Last_Edit] [datetime] NOT NULL,
[Is_Answered] [int] NOT NULL,
[Supporter] [varchar](50) NULL
)
I worked before with "single" rows that are being passed back, however multiple rows (in this case -> 1 user can have multiple tickets) seem to be a problem for me...
At least I'm happy you helped me on the way, i'll try and keep testing if I can get this to work.