![]() |
#1 |
Registered User
Join Date: Jul 2011
Posts: 262
|
Outputting PHP code from MySQL
Hi All,
I am storing some PHP code in a MySQL table for inclusion on a page. My problem is that, when the page calls the content for the page, it's as if the PHP doesn't exist... nothing happens! Being a newbie to MySQL, I have no clue why this is (or, more precisely!) isn't happening. Can someone give me a tip?? Thanks in advance.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
![]() |
![]() |
![]() |
#2 |
Registered User
Join Date: Sep 2013
Location: France
Posts: 20
|
Actually I have knowledge of coding but for gaming apps. So not more info by me. I hope someone will help you.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. that gives PSN card. Get your To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. /Playstation Network card here fast! |
![]() |
![]() |
![]() |
#3 |
Registered User
Join Date: Sep 2013
Posts: 5
|
Can you give us an example of the code you are using and the query?
|
![]() |
![]() |
![]() |
#4 |
Registered User
Join Date: Oct 2013
Posts: 15
|
PHP code in mysql will not work, unless you need to re-execute in the server
|
![]() |
![]() |
![]() |
#5 |
Registered User
Join Date: Nov 2013
Posts: 92
|
I know the bascis only.. i dono the whole funtionality
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
![]() |
![]() |
![]() |
#6 |
Registered User
Join Date: Dec 2013
Posts: 137
|
Can you share code with us?
__________________
Visit my site for To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
![]() |
![]() |
![]() |
#7 |
Registered User
Join Date: Mar 2014
Posts: 19
|
Sorry But What you are talking about???????
This is very strange, if you want to include any php code or call it, you have to create either functions or classes (Objects), you must save data types only in Mysql Database, e.g if you want to retrieve some text, read about object oriented php. (Database is to store data only not code)
__________________
Mega Business Solutions! To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
![]() |
![]() |
![]() |
#8 |
Registered User
Join Date: Mar 2014
Posts: 19
|
if you want to store any code as data you must put it as text and then in the view you can put <?php and ?>
example in index.php $query = "SELECT * FROM some_table WHERE anything = anything"; $results = mysql_query($query); ---->will get you the php code you stored as text while ($text = mysql_fetch_array($results)) { echo "<?php"; echo $text['php']; echo "?>"; } the result will be <?php some php code here ?> but as i said it will be represented as text not as code to run
__________________
Mega Business Solutions! To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|