SpiderPhp

Just another WordPress weblog

Posts Tagged ‘Stored’

With Php And Mysql, Why Are Even Specific Results Stored In An Array?

Posted Wednesday, January 27th, 2010
Tags: , , , , , ,
Posted in Uncategorized | 5 Comments »

That is to say, if you select a specific field, why does it need to store the results in an array? I understand if you select a whole row, but if it is just one value, why doesn’t it just store that value in a simple variable? Is there an advantage to the way it is done, or is that just the way it is?

What I am doing is when a user submits a page to my database (mySQL) it stores the day it was submitted. I want to be able to output to a specific page all submissions within 5 days time.
Of course it will change the output daily by dropping the 5th day and picking up the current day.

How To Use Php Code Stored In Mysql Database?

Posted Sunday, July 5th, 2009
Tags: , , ,
Posted in Uncategorized | 2 Comments »

I know how pull data from the database but I have stored within the a mysql field some text data. Within that that text I have put in some php variables. The problem is that when the browser renders the data that pulled from my sql, the variable stays as $user for example rather than changing to what I needed to. Is there any way to have the server process the php code stored within the mysql database?