![]() Topic awaiting preservation: making php messageboard mysql help (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() ok so i'm making a messageboard of my own in php. I've got the login and signup parts done, so now it's on to the actual message part of the messageboard I'm storing all my stuff in a mysql database, and i noticed that a normal varchar has a maximum of 255 characters which would quite frequently be to small for people's posts, so i looked around and the only other option i found was making a blob (are there any others that I missed?) so i made my blob and made a test message and of course it doesn't work in the browser with the following code: |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() |
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() but the whole reason i didn't use 'text', or 'varchar' as the type is because it limits each one to 255 characters. |
Bipolar (III) Inmate From: Brooklyn, NY |
![]() You can create indexes on the first 255 characters of a text column, but it can hold 16,777,215 characters |
Paranoid (IV) Inmate From: Sthlm, Sweden |
![]() Hi there maninacan code: <?php
|
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() ok, so i switched the type from 'blob' to 'text' and I do the following stuff after I connect to the database: |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() echoing a My SQL result set will not echo the what the query returns (even if it's just 1) you'll usually get something like "MySQL result set" or something like that. you do need yoo use one of the mysql result methods applied to it to get some sort of usable data |
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() nevermind!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |