PhP and XML

I have recently just started using php and understand the
concept behind server side scripting. I was arguing with a co
worker about which would be better:
If I were to use php to run a query on some data in MySql and
pass the data back to flex...now if I had mutliple queries to run
would it be more efficient to run 1 large query on the data and
then store that data in an array, lets say, and search through it
locally.
OR
Call multiple times to a php script that has different
queries to the database?
Is there a right or wrong answer?
Thanks in advance!

Thanks for the answer I was thinking the same thing depending
on amount of data and such.
I am not a database guru but I do have a small background in
MySQL and the problem is I want to break the data up into tables as
much as I can(I like more tables with less data then less tables
and more data)...then I would prefer calling multiple queries.
While my co-worker wants 1 large table and run 1 query...which I
believe is more expensive. The data is quiet large in my opinion,
and how 3000-10000 table entries relate to size I am not sure.
I suppose I should mention I am trying to set up an office
intranet using Flex and this is why this topic has come up.
But if there is no definitive answer we will have to agree to
disagree...=)

Similar Messages

  • Flash Video Player, PHP, and XML

    I'm the visual designer for a web site "Global Oneness
    Project" (
    http://www.globalonenessproject.org/videos.php
    ) that's currently "streaming" progressive download quicktime
    movies. The individual video pages (where you view a video) is
    currently a php template that calls a MP4 from an XML file. Our
    goal is to switch the embedded quicktime videos to embedded Flash
    videos that play progressive download movies.
    Ideally I would like to create a single Flash Video player
    (SWF) thats embedded in a single php template (video.php), but will
    play different videos depending on what state of the php is being
    called. Basically, I want the site to work exactly like it does now
    but with Flash instead of Quicktime.
    I'm assuming that this will be created with some combination
    of an external "AS" file, the XML data and the PHP logic but can't
    even begin to get my mind around what needs to be done.
    I found a few examples of how to play multiple videos in a
    single player, but all of the examples use a playlist that's
    embedded in the SWF. The video player will only be used for player
    control and the user will choose the movie by selecting the correct
    PHP page within the HTML.
    I'll be thankful for any direction you all can give or even a
    Flash developer who would be able to take this project on.
    Thanks,
    Shawn
    [email protected]

    yes, it's possible.  and there are some similarities with an xml image gallery.  the main difference would be using something like an flvplayback component to display the videos as opposed to using a target movieclip to display the large image in an image gallery.

  • CS5 : tabs for .php and .css but spaces for .html ?!?

    Hello
    my problem is simple
    I modify the shorcuts for text indent to Tab by changing the files Menus.xml and the shorcuts file (these manips are painfull !). I have set 2 spaces as text indent in the preferences BUT it persists to add 2 tabs in php and css files !! in html-assimilated files no problem : 2 spaces
    Is Dreamweaver for pro or .... ?

    Hello
    lots of answers fo other thread but here...
    Please, Did  somebody have the same issue ?
    Best regards

  • PHP And Flex

    I have been trying to understand (via researching the Web and
    books from bookstores) different ways to integrate a php/mysql
    database into my Flex application. There appear to be multiple
    solutions which is confusing me so I am looking for some advice and
    feedback. My initial attempt is relatively simple (one table with
    12 fields) but I would like to get comfortable with more advanced
    applications. I have looked at CREATE APPLICATION FROM DATABASE,
    creating a php page with an HTTP Service request(with print, echo
    etc xml info), and finally I have looked at Joomla solutions. I am
    looking for some guidelines as to what approach can and should be
    used. I am a little past beginner level both in PHP and MYSQL using
    MAMP right now and/or Navicat.

    ohaio
    webService , httpService(get,send) and RPC benchmark
    http://www.themidnightcoders.com/blog/2007/03/flex-remoteobject-vs-webservice.html

  • AS3 to PHP to XML

    Does anyone know of an example that will show me how to have
    a php file save to an xml file? I want to send a php file xml data
    and have that xml data saved to a xml doc on my server.
    Thanks!

    There are loads of tutorials on having PHP save text data to
    a file, which
    is all you need... I'd search on 'php save text flash' for
    starters.
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Http service component working php and sql data

    hello i'm using that componet. i have trouble. now i want in my home page
    i have 2 title from my localhost/phpmyadin. and i want when click title 1 it will link to a detail.mxml  and display content of title 1
    and when click title 2 it will display content of title 2 in detail.xml
    i don't know transmission parameters . Can u help me please. I'm need it

    These links are good for showing how to use Flex + PHP + HTTPService + MySQL:
    http://www.switchonthecode.com/tutorials/using-flex-php-and-json-to-modify-a-mysql-databas e
    If this post answers your question or helps, please mark it as such.
    http://www.switchonthecode.com/tutorials/flex-php-tutorial-transmitting-data-using-json
    http://www.switchonthecode.com/tutorials/flex-php-json-mysql-advanced-updating
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex Training and Support Services

  • Versions of PHP and libxml2 for Linux Redhat

    I installed PHP 5.3.19. I had two choices from http://php.net/downloads.php. Version 5.4 or 5.3. The latest version of libxml2 available for RHEL 5.5 is 2.6.26 release 2.1.15. Should I go with this one or should I download a later version for Fedora, and if so which one, or should I download an earlier version of PHP to go with libxml2 2.6.26 release 2.1.15 and if so which one?
    Edited by: 944901 on Dec 11, 2012 11:06 AM

    - Oracle Linux 5 is also available from the repo I mentioned.
    - There are 8 extensions in the PHP source that require libxml2. I don't know which one(s) you want. I have built some in the past on OL. I expect many other people have built PHP and some or all of the XML-based extensions on RH or OL 5.x. You won't have difficulty testing it yourself since building command line PHP takes only a few steps; just don't pass an with-apxs2 flag to PHP's "configure" command. You can choose which extensions you want, such as with-simplexml (which is default, BTW)
    - The PHP RPMs will not install on OHS because the RPMs depend upon, and install into, the httpd RPM
    - The OHS web page you mentioned wasn't written by me (and is slightly obsolete regarding header files, though I've often requested the owner update it). The best instructions for installing on OHS are in the newly updated The Underground PHP and Oracle Manual. See page 86.
    - Again, I'd recommend using PHP 5.4.

  • Help with Flex - PHP - and SQL Server

    Good afternoon,
    I have been working on this problem for over a week and am at
    my wit's end. I am trying to create an application that will allow
    me and my fellow statisticians to share code easily. The
    technologies at my disposal are Flex, PHP and SQL Server 2005. The
    web server is IIS. I have downloaded and installed the PHP driver
    for SQL Server 2005 and am able to query the database and generate
    XML. The problem I'm having is that I can't return the XML from PHP
    to Flex.
    If I execute the php code in a web browser and view the
    source, it looks like XML. I can then cut and paste the exact same
    code into an xml file and read it in from the harddisk and the tree
    will populate. Can anyone please help me? I don't have flex builder
    so I it's hard for me to use trace and view what is going on.
    Thanks in advance,
    Eric Graves

    Thanks for the suggestion. I have tried every permutation of
    e4x path notation I can think of. You're right, you're not supposed
    to need the root level as that's supposed to be returned in the
    result. So you should only need to reference first level after the
    root. When I do this and launch the .SWF I get a completely empty
    tree.
    I think the problem lies somewhere in my understanding of
    what format Flex needs returned from a HTTPRequest. It's my
    understanding that it just needs to be XML. As far as I can tell,
    that's what I'm sending it. On the PHP side, does it have to be
    cast a special way? Everything I've seen just shows people using
    ECHO to output the XML data.

  • PHP generated XML files in Flash

    I want to create a flash based frontend for my image gallery
    system. I need to load in an php generated xml file (something like
    images.php). But Flash seems to load the unparsed xml file
    (webserver with php works fine). Maybe that's just happening in the
    authoring environment. I'm trying to load the xml file with the
    XML-connector. Can someone give me an advice before I do hours of
    trial'n'error business?

    It seems like I don't get my foot into the AS/XML door. My
    XML looks like this:
    <root>
    <image>
    <url>
    <name>
    <etc>
    (Close tags not shown)
    The XML file is valid and works with XML-connector. I try to
    access the XML data with this AS:
    xml_doc = new XML();
    xml_doc.load('flash.xml');
    xml_doc.onLoad = function(success) {
    //trace(this.toString());
    xml_doc.ignoreWhite = true;
    //trace(xml_doc.toString());
    trace(xml_doc);
    var mainnode:XMLNode = xml_doc.firstChild;
    var imagenodes:Array = xml_doc.firstChild.childNodes;
    for (var i:Number = 0; i < imagenodes.length; i++) {
    // for each person node:
    var imagenode:XMLNode = imagenodes
    images.push(
    {i:i+1,
    url:imagenode.childNodes[0].nodeValue,
    imagename:imagenode.childNodes[1].nodeValue
    trace(images);
    I'm not getting any values out (just 'undefined'). There
    seems to be something missing, but I just don't find out what.
    Cheers,
    Martin

  • Php generated xml trouble

    Hi,
    This is probably something dumb, but here goes...
    I've been exploring the basics of incorporating data from a MySQL table into a Flash movie by writing an XML file using PHP to read the data.  All I'm trying to do at this early stage is successfully read the data into my Flash movie and be able to access the nodes.  Here is my script which is pretty much taken from the Flash help files;
    var usageXML:XML;
    var XML_path:String="create_xml.php";
    var XML_URL:URLRequest = new URLRequest(XML_path);
    var myLoader:URLLoader = new URLLoader(XML_URL);
    myLoader.addEventListener (Event.COMPLETE, xmlLoaded);
    function xmlLoaded(event:Event):void {
        usageXML=XML(myLoader.data);
        trace("Data loaded successfully");
        trace(usageXML.day_usage[7].day_summ);
        trace(usageXML.toXMLString());
    This code works fine when I switch the file name "create_xml.php" with an xml file that I create by simply copying and pasting the source code for the php file into a new file with the file extension "xml".  But when I run the above as is, I get an error of:
    TypeError: Error #1010: A term is undefined and has no properties.
        at test_usage_reports_fla::MainTimeline/xmlLoaded()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    Does anyone see what I am doing incorrectly for a php generated xml file versus an static xml file?
    Oh, btw, all three files (Flash movie, php file and static xml file are all in the same directory).

    I answered my own question and thought I would post it here in case someone else runs into the same confusion I had.
    I changed the name of the file from just the name of the file itself to the full path on the local server ("http://localhost/mysite/create_xml.php") and that worked.  I guess I didn't realize that Flash had to be pointed at the URL and not just the file itself.
    Now I can continue with exploring how to actually incorporate the data into the Flash movie.  Yea!

  • Guided research with Java and XML

    Hi all,
    I'm a last year student and now I have to choose a topic for my Guided Research Project.
    My interest in XML and databases pushes me in this direction. However, I still cannot come up with an interesting proposal for the project. At first I considered implementing a "XML <-> databaseSchema" converter, but then I found out that many similar tools already exist. I have background in Java, PHP and mysql which could be useful.
    I was wondering if you could give me an idea about a possible topic.
    Thank you very much!
    Regards,
    J

    For parsing you can use SAX Parser and for document generation you can use DOM Parser.

  • Sessions between php and applet

    i have question
    is there possiblity to read in applet session created in php. i have server witch php and in php i wrote "business tier". i need to read session created in php. is there a way to read this seesion by enering session id in applet parameters?

    Here's the web.xml... a trimmed version...
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>default</servlet-name>
    <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <init-param>
    <param-name>listings</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>invoker</servlet-name>
    <servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>0</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
    <param-name>logVerbosityLevel</param-name>
    <param-value>WARNING</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ssi</servlet-name>
    <url-pattern>*.shtml</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>cgi</servlet-name>
    <url-pattern>/cgi-bin/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>

  • Include PHP and/or JAVA code in any BC site.

    I am thinking about including some PHP and/or JAVA code into my BC site and I was wondering if I am allowed to do this. Just Curious. Thanks.

    That's a shame, because I was thinking about implementing a business search api for my real estate website that was created using business catalyst that allows the collection of all real estate agents in Australia by searching and collecting their information from the Yellow Pages and White Pages directories, and include these information in a database that allows users to search for the real estate agent they want and comment on that agent. This can only be done by integrating some PHP or JAVA code into my BC website.
    So that means that the only way that I can do this is to create a web app that allows users to search for the real estate agent they want to see and comment on that agent, just by entering real estate agents' information into the web app's database and using various BC modules and plugins. Are there other easier ways to do this? Thanks.

  • PHP and MySQL Connection problem

    I am trying to make a PHP MySQL on a remote server connection in Dreamwesaver CS3.
    When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.
    "Access Denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured."
    I know the user, password, etc. work, as I can access the MySQL database with other software.
    I checked with my host and they say there are no permission problems on their end.
    I have checked the settings on the Test Server page in Site Setup and everything looks correct and works there.
    I have not seen this particular problem described in other forum postings (although there are a LOT of postings on this topic!).
    Any help would be appreciated.

    I thought my testing server was the remote server and is always on as far as I know. I don't know how to turn it on or off.
    Is there some other testing server that I should be aware of?
    Frank
    Date: Wed, 3 Jun 2009 15:43:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP and MySQL Connection problem
    I know you are using remote, but is your testing server on? if not turn that on and see if that does it. it just happened to me working on remote server and could not get mysql conn to work, until I turn on my testing (developer server), then I was able to connect to mysql and the tables that I created in phpmyadmin remotly was downloaded.
    >

  • How do I add an already built Shopping Cart  (PHP and MYSQL) application to a page in a Muse site?

    How do I add an already built Shopping Cart  (PHP and MYSQL) (Cartweaver 4) application to a page in a Muse site? Do I have to export the Muse site as Html to dreamweaver and them use the extension to bring the shooping cart in or can I do it directly in Muse?
    Message was edited by: mgv2048

    We have experimented with doing this with some good success. We have been working on adding Cartweaver to a Facebook page by essentially adding a Cartweaver store to Facebook in an iframe.  The "store" would be pages with just your basic product display, cart, and checkout functionality, with none of the "window dressing" - just use CSS to match the color and general look of the design it's being added to.
    The one problem with this for Facebook is when it comes time to check out toy have to leave Facebook and go to your server where an SSL is in place.  Fortunately in this situation this would not be the case, you can have an SSL installed to the root of your site and you'll be okay.
    This is an interesting project.  Give this a try and let me know how it goes and if you run into any snags, please make a post on the Cartweaver forums: http://forums.cartweaver.com - I'm really confident that this can work, and not only work, but work well.
    Looking forward to hearing how this goes, and being of what help we can.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    PHP & ColdFusion Shopping Cart for Adobe Dreamweaver
    Stay updated:
    http://www.facebook.com/cartweaver
    http://www.twitter.com/cartweaver
    http://blog.cartweaver.com

Maybe you are looking for

  • How to connect oracle 9i database in PHP (Linux)

    I found that I cannot connect oracle 9i thru PHP in Linux, where can I get the necessary information and samples to setup this connection?

  • Parallel processing in JAVA

    Hello Everyone, I want to connect multiple computers together. i want a functionality like one Main Processor are working as a server and others are working as a client processor. So, 1. How to connect all processors together?? 2. how to allocate a p

  • I need a password to open a pdf document I my email?

    I need a password to open a pdf document in my email how do I do that?

  • Business Content Level

    Hello, How do you determine what level of Business content you are at? Currently I know we are running 3.0B, and we are starting an upgrade to 3.5 Thanks, Nick

  • Add custom field column in VL03N main screen

    Hi, We added a new field to LIPS via an append structure but would like it to appear in the main screen next to the quantity.  I keep reading about transaction variants and SHD0 but nothing I see there helps me know how to change the order or content