pls provide steps to connect mysql database in flex

pls provide steps to connect mysql database in flex

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 database in php using mysql
how to connect to database in php using mysql  how to connect to database in php using mysql
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
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
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
Connect to the database
Connect to the database  how to connect to the database in the iphone
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
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
How to connect to MySQL from command prompt?
through the steps to connect to MySQL from command prompt in Windows machine... to provide the MySQL database password. In my case both username and password is root. After this you will able to connect to MySQL database from command prompt
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
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
How to connect to MySQL in JSP?
, You can use the Java JDBC code to connect to MySQL database in JSP page. Check the tutorial: Connect JSP with mysql Thanks...How to connect to MySQL in JSP?  How to connect to MySQL in JSP
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
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
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
connect a web page to a database
connect a web page to a database  how to connect a web page to a database
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 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
Connect JSP with mysql
how to connect to MySQL database from your JSP code. First, you need to create...) Here is the video tutorial of "How to connect to MySQL Database from JSP... Connect JSP with mysql   
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
How to connect mysql with jsp
How to connect mysql with jsp  how to connect jsp with mysql while using apache tomcat
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
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
connect database with javascript
connect database with javascript  can you please tell me how to connect database with javascript code. [email protected] this is my mail id thanks in advance
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
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
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... the MySQL database with java prommining. Classes, interfaces and methods
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
Connect JSP with mysql
Output of the program when unable to connect to specified mysql database... Connect JSP with mysql   ... named 'usermaster' in mysql. To create this database we need to run the following
How to connect with database
How to connect with database  jdbc connection
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
ModuleNotFoundError: No module named 'connect-mysql'
ModuleNotFoundError: No module named 'connect-mysql'  Hi, My... 'connect-mysql' How to remove the ModuleNotFoundError: No module named 'connect-mysql' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'connect-mysql'
ModuleNotFoundError: No module named 'connect-mysql'  Hi, My... 'connect-mysql' How to remove the ModuleNotFoundError: No module named 'connect-mysql' error? Thanks   Hi, In your python
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...://www.roseindia.net/mysql/mysql5/Installing-MySQL-on-Windows.shtml ThanksADS_TO_REPLACE_2
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 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
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
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
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
Create a Table in Mysql database through SQL Query in JSP
; This is detailed java code to connect a jsp page to mysql database and create a table of given... Create a Table in Mysql database through SQL Query in JSP... in mysql database using jsp</title> </head> <body>
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
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
update mysql database
update mysql database  update mysql 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?  HOW TO CREATE COMMENT IN WEBSITE AND CONNECT TO DATABASE

Ads