Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa XML pls provide steps to connect mysql database in flex

Have Programming Question? Ask it here!
 
 
 


imdad
pls provide steps to connect mysql database in flex
2 Answer(s)      5 years and 8 months ago
Posted in : XML



Advertisement
View Answers

January 12, 2009 at 11:25 PM


Hi friend,

For read more information on flex visit to :

http://www.roseindia.net/flex/

Thanks


January 13, 2009 at 3:54 AM


Hi friend,



I am sending simple code of flex with php. Please implement following code according to requirement. if you have any problem then send me code and please tell me which technology want to use with flex.


<mx:Script>
<![CDATA[
function logIn():void
{
userRequest.send();
}

function userCount(event:Object):void
{
//mx.controls.Alert.show(event.result.doc.user, 'Callback');
user.text = event.result.doc.user;
}

function httpError(event:Object):void
{
mx.controls.Alert.show(event.toString(), 'Callback');
}
]]>
</mx:Script>

<mx:Form width="200" height="255" id="form1">
<mx:Panel width="128" height="143" layout="absolute" title="Test" id="panel1">
<mx:Text x="0" y="0" text="# user" width="108" textAlign="center"/>
<mx:TextInput x="25" y="20" width="58" height="20" id="user" editable="true" enabled="true" fontSize="10" color="#ff0000" textAlign="center" fontWeight="bold"/>
</mx:Panel>
<mx:Button label="Count" click="logIn()" id="button1"/>
</mx:Form>
<mx:HTTPService id="userRequest" url="functions.php" useProxy="false" method="POST" showBusyCursor="true" result="userCount(event)" fault="httpError(event.fault)"/>
</mx:Application>


here is the php script in the functions.php:

<?php

$server="localhost";
$user="amar";
$pass="amar123";
$db="myDatabase";

$link = mysql_connect($server, $user, $pass);
$ret = mysql_select_db($db, $link);

$query = "SELECT count(*) as nb from user";
$result = mysql_query($query, $link);

$nb=0;
while($row=mysql_fetch_array($result))
{
$nb += $row[0];
}
mysql_free_result($result);
mysql_close($link);

$xml="<?xml version=\"1.0\" encoding=\"utf-8\"?><doc><user>".$nb."</user></doc>?>";
header("Content-Type: text/xml");
print ($xml);

?>

--------------------------------

Visit for more information:

http://www.roseindia.net/flex/

Thanks.


Related Tutorials/Questions & Answers:
pls provide steps to connect mysql database in flex - XML
pls provide steps to connect mysql database in flex  hi,i am new to flex and doing project. i have doubt in how to connect MYSQL database in flex .pls provide the steps . i would be really thankful 2 u. i am loooking
pls provide steps to connect mysql database in flex - XML
pls provide steps to connect mysql database in flex  hi, pls provide steps to connect mysql database in flex.pls i am trying from last week still it was not connected .pls provide the step by step procedure.i am looking
Advertisements
pls provide steps to connect mysql in flex - XML
pls provide steps to connect mysql in flex   hi ,PLS SUGGEST ME I... THE FUNCTIONS.PHP THERE .OR ANY OTHERWAY .HOW FLEX CONNECT WITH WAMP .IF SO PLS PROVIDE THE SET PATH.PLS IAM LOOKING FOR UR REPLY.THANKS INADVANCE
pls provide steps to write ejb3.0 simple application in eclipse - EJB
pls provide steps to write ejb3.0 simple application in eclipse   hi, pls provide steps to create simple ejb3.0 application in eclipse .And also how to create entity bean ,session bean in ejb3.0
pls provide common path to set image in flex - XML
pls provide common path to set image in flex  hi, pls provide... like these ...\pictures\useful_links_logo.gif .its not working. pls provide the coding in mxml to set common path of image in flex
How to connect to MySql Database from Servlet?
will show you how to connect to MySQL database and perform select operation. You will learn the JDBC steps necessary to connect to the MySQL Database and execute...; font-weight: bold; } How to connect to MySql Database from Servlet
how to connect to database in php using mysql
how to connect to database in php using mysql  how to connect to database in php using mysql
not able to connect to mysql using.. jdbc
not able to connect to mysql using.. jdbc   i am not able to connect to mysql using jdbc .. is there any classpath that i need to set..because i am using mysql-connector-java jar file..to connect to mysql.. Pls provide the steps
Mysql connect
Mysql connect  i can have a mysql database file and mysql-connector-net .but i have not mysql database. how to connect vb.net thsis database.(C:\Documents and Settings\Admin\My Documents\VB.NET\Stock delna\STC.sql ). plz help me
Connect to the database
Connect to the database  how to connect to the database in the iphone
Using javabeans to connect mySQL database on a jsp page - JSP-Interview Questions
Using javabeans to connect mySQL database on a jsp page  Hi, Am doing my project and I don't know how to connect a jsp page to a mySQl database...; Connecting a JSP page to MYSQL Database using JavaBean File Name: beancode.java
mysql_connect arguments
mysql_connect arguments   How many arguments a mysql_connection function required to connect to the database?   ?mysql_connect? function... And if the given arguments are correct it will connect to the database and print
how can i create a mysql database to connect to this code - JDBC
how can i create a mysql database to connect to this code  i need help creating a mysql database for this code. code is import java.awt...."); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/register
how can i create a mysql database to connect to this code - JDBC
how can i create a mysql database to connect to this code  i need help creating a mysql database for this code. code is import java.awt...."); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/register
Database in flex
Database in flex  Hi.... I want to connect the database via flex program please give me the procedure with example so I can clearly understand..... Thanks
cannot connect to database - JDBC
cannot connect to database  Iam using eclipse in my system ,when connecting the database mysql version 5.0 to the eclipse iam getting an error as ""Creating connection to mysql has encountered a problem.Could not connect to mysql
Connect database in Access to Netbean?
Connect database in Access to Netbean?  how to connect database in micrsoft access to Netbean?i know it can be connected by using JDBC-ODBC bridge, can i know the steps in connecting the database? Is there any source code
How to connect mysql with jsp
How to connect mysql with jsp  how to connect jsp with mysql while using apache tomcat
PHP MySQL Connect to a Database
PHP MySQL Connect to a Database:       In WAMP software stack, php and mysql are bundled together and we can use it with so much ease. To connect with mysql server we can use two ways one
Connect JSP with mysql
you how to connect to MySQL database from your JSP code. First, you need... database in my sql command prompt) 2. Connect JSP with mysql: ... with specified mysql database : Output of the program when unable to connect to specified
connect a web page to a database
connect a web page to a database  how to connect a web page to a database
unable to connect database in java
unable to connect database in java  Hello Everyone! i was trying to connect database with my application by using java but i am unable to connect...;init>(test.java:14) at test.main(test.java:23) pls help me to solve
TO connect multiple database
TO connect multiple database  How to connect several database from a single application in java depending upon the user input it will connect to that database
unable to connect database in java
unable to connect database in java  Hello Everyone! i was trying to connect database with my application by using java but i am unable to connect...(test.java:23) pls help me to solve
connect to the database from JSP
connect to the database from JSP  How do you connect to the database from JSP?   A Connection to a database can be established from a jsp page by writing the code to establish a connection using a jsp scriptlets
doubt in connecting mysql in flex - XML
doubt in connecting mysql in flex  The ?Create application from database? is a Flex 3 feature that enable you to create simple applications in few... MySql Connection Host URL: localhost Database Name:users User Name: root
doubt in connecting to mysql in flex - XML
doubt in connecting to mysql in flex  The ?Create application from database? is a Flex 3 feature that enable you to create simple applications in few... of a tipical MySql Connection Host URL: localhost Database Name:users User Name: root
Connect JSP with mysql
; This query creates database 'usermaster' in Mysql. Connect JSP... with specified mysql database : Output of the program when unable to connect... Connect JSP with mysql   
steps to upgrade mysql 5.1 to 5.5 mac
steps to upgrade mysql 5.1 to 5.5 mac  steps to upgrade mysql 5.1 to 5.5 mac
steps to upgrade cPanel MySQL 5.1 to 5.5
steps to upgrade cPanel MySQL 5.1 to 5.5   steps to upgrade cPanel MySQL 5.1 to 5.5
How to connect with database
How to connect with database  jdbc connection
steps for installing mysql using msi package
steps for installing mysql using msi package  how to install mysql using msi package   Hello Friend, MySQL is open source database. Here... and Install MySQL. Please visit the following link : http://www.roseindia.net
how to connect mysql with JDBC - JDBC
how to connect mysql with JDBC  I have created three tables in the database MYsql, i have to connect them now using JDBC, can u please suggest me...(); } } Thanks Rajanikant  Hi friend, To mysql connect using JDBC
how to connect program to database
how to connect program to database  Sir i want ur help in my program. I want to save the data in the database. When i'll click on save button the entered data must be save in the database. I want an action performed method
connect with Database - SQL
connect with Database  Hi, when ever i m trying to connect with 10g ..i m getting error .. Failed to get a connection org.jboss.util.NestedSQLException: Could not create connection; - nested throwable
how to connect mySql drivers into eclipse(configuration)?
how to connect mySql drivers into eclipse(configuration)?  how to connect mySql drivers into eclipse(configuration)? I need the configuration in eclipse. what do i have to download from mySql and just downloading is enough or do
how to connect mysql from gui?
how to connect mysql from gui?  i am unable to connet to mysql server from my projet that is gui for mysql...can anyone help me in this...its urgent? i have to connet to mysql from gui..   Hi Friend, Try the following
Using Network Address To Connect to a Database
the port no of database you must provide a database name. Suppose you want to connect a MySql database with your application over a network then you must load... no of that database. The default port no of MySql database is 3306 and default host
MYSQL Database
MYSQL Database  Can any one brief me about how to use MYSQL Database..., the MySQL database server is most popular database server and if you want to know... and it will provide you extensive knowledge about your query. http://www.roseindia.net/mysql
MYSQL EXCEPTION -DATA TRUNCATION..pls resolve it
status successsfully connected unable to connect database Pls say whts...MYSQL EXCEPTION -DATA TRUNCATION..pls resolve it  while running my... and password to connect to database. */ connection = DriverManager.getConnection
error call to undefined function mysql_connect
error call to undefined function mysql_connect  what is error call to undefined function mysql_connect
Java Mysql Connection Example
in to connect with the database. Requirements to connect with the MySQL database...; MySQL in java. We have been provide some classes and API with which we will make... (should be kept into lib folder). In this example how to connect the MySQL
MYSQL Java Connector Library
This article discuss 'how to connect Java and MYSQL using MYSQL connector'... and MYSQL database. Downloading Java SDK and MYSQL server is not sufficient to create a database application in Java. You will also required a MYSQL Java
MYSQL EXCEPTION -DATA TRUNCATION..pls resolve it
MYSQL EXCEPTION -DATA TRUNCATION..pls resolve it  while running my program as follows Register1.html <!DOCTYPE html> <html lang="en"><head> <meta charset="utf-8"> <title>JavaScript Form
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?  HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?
HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE?  HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE
Pls provide me jsp code to get values in drop down list from another table's field....
Pls provide me jsp code to get values in drop down list from another table's field....  my project has customer registration and company registration........ pls provide me code.. thanx
Mysql Permission
Mysql Permission       Mysql Permission allows the user to connect to the database, Mysql... the permission to connect. All user /host/password combination are listed in this table
can't connect to MySQL Server(10060) - JDBC
can't connect to MySQL Server(10060)  Hii Sir, I am working... MySQL front end. Can we connect to the MySQL server using the I.P address... write as the subject. Can we connect thorugh a MySQL Frontend. Kindly
JDBC Steps ? Basic steps in writing a JDBC Application
you brief description of JDBC Steps for making connection with the database... connected to the MySQL database and retrieved the employee names from the database... Steps for making connection to the database and retrieving the employee from
Advertisements
 

 

 

DMCA.com