Possibility to pull any code anywhere

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
bambinou
Veteran Member
Posts: 163
Joined: 2013-02-01 15:09

Possibility to pull any code anywhere

Post by bambinou » 2014-02-13 10:46

Hi,

I have seen a lot of great bootstrap templates on the internet, the problem is that they are front end user templates and not backend like what AppGini uses.
Will you one day include a way of letting us pull any type of data from mysql to any front end templates we wish to use.

For example, let's say I upload a picture in the back end but wish to see that same exact picture in my new front end template, at the moment you have code your own code, but having something to copy and paste from the back end on the front end layout would have been fantastic.

It could be some text, pictures and more.


Thanks,

Ben

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Possibility to pull any code anywhere

Post by a.gneady » 2014-02-15 15:33

Let's assume that your generated AppGini application is at http://website.com/backend while your front-end code is in the folder above it ... that is, http://website.com ... You could try something like this in your front-end scripts:

Code: Select all

<?php
	$appgini_dir = dirname(__FILE__) . '/backend';
	include_once("$appgini_dir/defaultLang.php");
	include_once("appgini_dir/language.php");
	include_once("appgini_dir/lib.php");

	/* query to obtain your requested data */
	$res = sql("select * from customers where customer_id='455'"; $o);
	$data = mysql_fetch_row($res);

	/*
		You can now use variables like $data['customer_name'] inside your page code
		where "customer_name" is an example field name ... it would be replaced by
		actual values from the database ...
	*/

?>
Or if the rest of your page is HTML code .. you can insert the data values into it like this:

Code: Select all

<?php echo $data['customer_name']; ?>
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

bambinou
Veteran Member
Posts: 163
Joined: 2013-02-01 15:09

Re: Possibility to pull any code anywhere

Post by bambinou » 2014-02-15 15:38

Hi Ahamad,

Thank you so much.
It would be great to have this in your tutorials on your website because this is a very useful part of making appgini working well with front end designs.

Ben

bambinou
Veteran Member
Posts: 163
Joined: 2013-02-01 15:09

Re: Possibility to pull any code anywhere

Post by bambinou » 2014-02-15 15:41

Also, I have just noticed, AppGini do not use Mysqli?
mysql is deprecated no?

Thank you,

Ben

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Possibility to pull any code anywhere

Post by a.gneady » 2014-02-15 15:47

Yes, I'll add mysqli support in future releases.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

isonewiner
Posts: 1
Joined: 2014-08-10 03:33

Re: Possibility to pull any code anywhere

Post by isonewiner » 2014-08-10 03:38

Hello how can you pull tha code like this example making a list result using pagination

SELECT id,name,image,category FROM table WHERE id = %s ORDER BY RAND ()

Post Reply