/    Sign up×
Community /Pin to ProfileBookmark

I’m pulling in the following from SQL (please don’t ask, I know it looks junkie as hell):

[QUOTE]

HANALYSISN.brFISH DATE = CHROM DATE = BAND RESOLUTION = BAND METHOD = .brPROCESSING = .brNo. Cells Analyzed: .brGTW = CBG = QFQ = RBG = .brNo. of Supplements: .brGTW = CBG = QFQ = RBG = .brNo. Cells Karyotyped: .brGTW = CBG = QFQ = RBG = .brChromosomes:.br46:.brGTW = CBG = QFQ = RBG = .br<45:.brGTW = CBG = QFQ = RBG = .br45:.brGTW = CBG = QFQ = RBG = .br47:.brGTW = CBG = QFQ = RBG = .brOther:.brGTW = CBG = QFQ = RBG = .brCells: Colonies: Culture: .brCells: Subculture: .brDirect Cells: Direct Cultures: .brFISH Reviewed By: .brChrom Reviewed By: .br.brHREPORTINGN.br.brPRELIM: Given to: Date:

[/QUOTE]

Which is truncating to:

[QUOTE]

HANALYSISN.brFISH DATE = CHROM DATE = BAND RESOLUTION = BAND METHOD = .brPROCESSING = .brN

[/QUOTE]

Any idea what characters might be killin’ this thing?

to post a comment
PHP

9 Comments(s)

Copy linkTweet thisAlerts:
@scragarMar 14.2008 — N is either null or an error depending on version of PHP, either way remove the and it should work.
Copy linkTweet thisAlerts:
@Doc_ThirstauthorMar 14.2008 — I used a str_replace to remove all and I'm still coming up with the truncated output. Do I need to replace those in the DB before php even gets ahold of it?
Copy linkTweet thisAlerts:
@Doc_ThirstauthorMar 14.2008 — Modified it to add spaces after the no change, I'm really perplexed now:

HANALYSISN.brFISH DATE = CHROM DATE = BAND RESOLUTION = BAND METHOD = .brPROCESSING = .br No Cells Analyzed: .brGTW = CBG = QFQ = RBG = .br No. of Supplements: .brGTW = CBG = QFQ = RBG = .br No. Cells Karyotyped: .brGTW = CBG = QFQ = RBG = .brChromosomes:.br46:.brGTW = CBG = QFQ = RBG = .br<45:.brGTW = CBG = QFQ = RBG = .br45:.brGTW = CBG = QFQ = RBG = .br47:.brGTW = CBG = QFQ = RBG = .brOther:.brGTW = CBG = QFQ = RBG = .brCells: Colonies: Culture: .brCells: Subculture: .brDirect Cells: Direct Cultures: .brFISH Reviewed By: .brChrom Reviewed By: .br.brHREPORTINGN.br.brPRELIM: Given to: Date: .brFINAL: Completed by: Date: Time: .br.brHFISHN.br
Copy linkTweet thisAlerts:
@ss1289Mar 14.2008 — Is your database field set to hold that many characters?
Copy linkTweet thisAlerts:
@Doc_ThirstauthorMar 14.2008 — Yeah, its not writing to the db, its pulling it out. The long strings above are all strait cut and paste from the DB column.
Copy linkTweet thisAlerts:
@Doc_ThirstauthorMar 14.2008 — Here is the code:

[CODE]
$recordset7 = mssql_query ("SELECT * FROM record7e2 where CASE_NO = 'G98-2928'", $handle);
while($arr7 = mssql_fetch_row($recordset7))
{
$text = trim($arr7[3]);
echo "$text";
}
[/CODE]


Here is the page itself:

http://pathology.wustl.edu/test/conversiontest.php

Here is the actual data in the DB:

HANALYSISN.brFISH DATE = CHROM DATE = BAND RESOLUTION = BAND METHOD = .brPROCESSING = .br No Cells Analyzed: .brGTW = CBG = QFQ = RBG = .br No. of Supplements: .brGTW = CBG = QFQ = RBG = .br No. Cells Karyotyped: .brGTW = CBG = QFQ = RBG = .brChromosomes:.br46:.brGTW = CBG = QFQ = RBG = .br<45:.brGTW = CBG = QFQ = RBG = .br45:.brGTW = CBG = QFQ = RBG = .br47:.brGTW = CBG = QFQ = RBG = .brOther:.brGTW = CBG = QFQ = RBG = .brCells: Colonies: Culture: .brCells: Subculture: .brDirect Cells: Direct Cultures: .brFISH Reviewed By: .brChrom Reviewed By: .br.brHREPORTINGN.br.brPRELIM: Given to: Date: .brFINAL: Completed by: Date: Time: .br.brHFISHN.br
Copy linkTweet thisAlerts:
@ss1289Mar 14.2008 — I'm not sure what it is. I do notice that what it is displaying is exactly 100 chars. Try different ways of displaying it through php.
Copy linkTweet thisAlerts:
@Doc_ThirstauthorMar 14.2008 — Yeah I thought you might be onto something there. So I loaded up the whole table and every row is truncating at the same spot regardless of the number of characters prior to it.

http://pathology.wustl.edu/test/conversiontest.php

Is is a better rep (img with formatting) of the data in the field:

http://uoda.darkandstormynight.org/hellaforums/uploads/test.jpg
Copy linkTweet thisAlerts:
@Doc_ThirstauthorMar 14.2008 — OK this has to be some type of sql view restriction. I can change the characters around all I want and its still truncating after the same point. I guess I'll start researching MS views + php.

Thanks for the suggestions!
×

Success!

Help @Doc_Thirst spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...