Re: MySQL Result Handling

From: Date: Fri, 06 Aug 2004 20:02:43 +0000
Subject: Re: MySQL Result Handling
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-193036@lists.php.net to get a copy of this message
> The one technique that I have a bit of a question about is realted to the > handling of MySQL results. It seems that when you query the database with > their system, it takes all the results and outputs them into a string > similar to: > > I have a question<:>I have an answer > > which is then interpreted: > > list($question, $answer) = explode("<:>",$result); > > back to normal variables. > > Does this soind familiar to anyone? I have never run across anything like > this and was wondering if maybe someone could explain to me why this could > be desirable. > There's nothing wrong with what's listed above. In fact, explode is highly used when you want to grab, say, a datetime entry from MySQL and break the date and time apart from each other. Or break the date apart. It looks like they simply consolidated the question/answer to one line rather than having two indexes in the MySQL table. Probably a preference. -- --Matthew Sims --<http://killermookie.org>

« previous php.general (#193036) next »