Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Using PHP and MySQL with Flash
Let's Get Started - Part I - setting up the MySQL database and relevant SQL commands
You must have a MySQL server set up by your host or on your local machine. It is assumed that yourself or your server administrator has already created a database that you can use. Make sure to read all the documentation your host has available on using MySQL on their servers. I'll attempt to explain the easiest way to set up a table with your shell account. If you server doesn't allow the use of telnet they will have other methods available to you to create your table. You can also just use PHP to create your table once your database is set up.
Once your database has been set up. Open up your shell account. From the telnet command prompt type in "mysql -p YourDatabaseName". Then you will be prompted for a password. Type in your database password. You'll see some text appear after this, then the command prompt changes to read mysql>; (then Type) use Database Name. We will name the table "saveMovie" for this example. Then type in the following create table syntax as it appears below:
SQL table
You can then use the describe table command to see what the table looks like.
Here are a couple other MySQL commands you may find useful from the shell.
Change the Column Name:
mysql>alter table saveMovie change Name SomeotherName varchar(30);
This just changes the name; notice the syntax -- after change enter the old Column Name followed directly after by the new column name and definition.
Change the Column Type:
mysql>alter table saveMovie change Name Name varchar(70);
This will allow users with Names longer then 30 characters to store their name properly. Otherwise their limited to 30 characters.
Add Timestamp:
mysql>alter table saveMovie add lastAccessed timestamp;
This just adds a column to your database; in this case it's a timestamp, you can use this to see when the user last logged in and changed their settings.
Delete one of the Columns:
mysql>alter table saveMovie drop Name;
This just deletes the column that you had previously named "Name"
Select and view everything in the Table:
mysql>Select * from TableName;
Delete the whole table and start over:
mysql>drop saveMovie;
[ Next Page ]

[Page 1]  [Page 2]  


Comments:
PHP and MYSQLmesh06/16/05 03:31
RE: what are the advantages of php over asp.adsims06/11/05 20:30
what are the advantages of php over asp.netsankar06/08/05 01:16
PhpMyAdmin_questionmaria05/02/05 05:52
url from in Flashflorin11/29/04 06:09
RE: Loading PHP variables into Flash without a DBDaxx03/09/04 02:58
RE: php and flash 5Rigreja02/26/04 21:01
Flash Frontend - PHP MySQL Backend SolutionGima02/12/04 15:41
RE: controlling the browser windowthorax02/04/04 16:54
RE: what are the advantages of php over asp.Thomas C01/28/04 22:29
RE: php and flash 5Emil Bygde01/22/04 05:57
RE: learning phpDJTestDrive07/19/03 21:19
over allavishek05/31/03 08:21
RE: what are the advantages of php over asp.myself05/15/03 17:05
Loading PHP variables into Flash without a DBpoepo04/08/03 06:29
RE: Flash and PHP/MYSQL CHATMikeS11/05/02 15:15
RE: how to create message board using phpervin11/04/02 08:09
Flash and PHP/MYSQL CHATTony B11/01/02 10:37
Knowing table SizeSri10/26/02 19:01
PHP/MySQL/FTPchatchai10/01/02 11:18
php and flash 5stephen09/23/02 15:59
what are the advantages of php over asp.sunil09/20/02 11:47
Using LoadVariablesNum Several times in a rowJody09/20/02 09:18
can some one help me with action sciptingslimjim09/18/02 23:22
PHPmyadmin mysqlJono09/18/02 00:00
RE: Passing Variables to PHPCS Joshi09/15/02 07:39
load data local using phpmassimo09/11/02 16:45
my application doesn't work in webserver !!andresol09/03/02 20:28
scrooler helpmark09/02/02 10:36
I am learnignedel aguila gimeranez09/01/02 18:13
RE: database...Rizwan Ahmed08/31/02 01:50
Passing Variables to PHPHauke08/21/02 07:15
Where to get online help with PHP and MYsqlKevin Barrett08/20/02 10:16
combobox dinamic phpmaker08/16/02 22:13
passing arraysGodwin08/15/02 14:33
how to insert data to d/base with multiinputcomel08/15/02 05:19
char problem with flashalex_dm08/08/02 05:06
char problem with flashAlessio08/08/02 05:03
how to display char received from phpAlessio08/08/02 04:54
RE: What is different from HTML and PHP?Raghuram08/07/02 18:13
RE: Flash - Mailtoto08/02/02 09:26
RE: load several variablesHooty McBoob08/01/02 13:06
RE: Any help would be greatly appreciatedOrion1308/01/02 06:51
Paging through Records in FlashOrion1308/01/02 06:36
musical instrument - Array >Flash > PHP issueWIlly Crantel07/30/02 01:36
Help-HebrewMaayan07/28/02 10:00
I Need Your HelpEugenio07/28/02 01:24
RE: i need help:((((((((((((((((Jason Wood07/26/02 11:51
Help with phpRockMeista07/24/02 03:54
RE: running php and mysql in macMAbans07/23/02 22:52
formsparadice07/23/02 06:09
RE: running PHpAdam Clarridge07/21/02 18:55
running PHpFrank07/17/02 06:19
PHP + MYSQL Stability on win32pms07/11/02 04:30
how to create message board using phpChris07/09/02 05:53
Flash media player bar scriptRizwan Saeed07/09/02 02:48
running php and mysql in macdr.piiam07/06/02 12:24
how to use php and mySQL in OS linuxkimball07/02/02 02:52
RE: where can i get free tutorial for php Aliaa07/01/02 04:58
RE: where can i get free tutorial for php Aliaa07/01/02 03:58
mot de passeyousfi06/29/02 06:19
i need help:((((((((((((((((mohammad06/26/02 04:59
database...raislam06/19/02 11:52
PHP variables into an SWFappel06/19/02 04:32
GD is not workingSaeed Ahmad06/19/02 03:27
SWF local mach. works, but not on server?hans06/19/02 01:13
SWF local mach. works, but not on server?hans06/19/02 01:12
Flash - MailManuel Bermejo06/18/02 12:50
Flash - MailManuel Bermejo06/18/02 12:50
RE: I need business KNowledge about PHP based webAhmed Messaoudi06/11/02 07:52
A.S. functions in PHPcristi06/10/02 11:11
Array() and loadVariables()SAC06/10/02 11:07
question of how save data in DBlatifa06/08/02 18:23
where should i start from?charles06/08/02 03:22
RE: sending variables between 2 swf's w/ php&XMLFERHAN06/06/02 18:08
load variablespeter06/06/02 14:23
RE: passing username/password infoFerhan06/05/02 22:21
FLASH DATABASE HELP NEEDED!Ferhan06/05/02 22:19
load several variablespeter06/05/02 21:11
load several variablesPeter06/05/02 20:42
Passing URLFarhad06/05/02 14:37
RE: Loadvariables not workingVikas06/01/02 12:08
RE: passing username/password infomatt05/30/02 23:48
dead linklunders05/30/02 17:41
RE: flash php mysqljason05/30/02 16:06
RE: Bring PHP a big future for us?Creuels Julien05/29/02 18:31
RE: Bring PHP a big future for us?Mathieu05/25/02 09:38
RE: Flash for FreeBSDspitstickler05/24/02 23:12
RE: Bring PHP a big future for us?ryan05/24/02 19:59
Bring PHP a big future for us?Faisal05/23/02 14:31
RE: LoadVariablesJared Blalock05/21/02 00:57
RE: Flash for FreeBSDmårten05/17/02 11:33
LoadVariablesice05/15/02 17:16
RE: What is different from HTML and PHP?yogesh05/15/02 01:55
flash with phpucok05/10/02 04:52
arraysKoen05/08/02 08:20
RE: where can i get free tutorial for php hashem05/01/02 03:31
Creating A...Spencer Bunton04/30/02 17:56
Knowing how to use FlashAshish Chaudhari04/29/02 08:39
Queryrichard04/24/02 23:21
where can i get free tutorial for php Vinod04/23/02 23:34
RE: What is different from HTML and PHP?Pablo 04/23/02 15:34
RE: What is different from HTML and PHP?Vana Tsivranidou04/23/02 06:22
What is different from HTML and PHP?Ole Andre04/21/02 09:34
passing username/password infoTom Steele04/19/02 21:14
Displaying ALL records in the table??Joe Toscano04/18/02 14:48
How to display ALL records in FlashJoe Toscano04/18/02 14:45
RE: I want to know that what is neccesary for phpd.a.04/18/02 05:45
RE: I want to know that what is neccesary for phpRonski04/17/02 06:02
RE: how to send values from javascript tp phpaleck04/17/02 03:58
how to send values from javascript tp phpsatish mishra04/16/02 08:24
I want to know that what is neccesary for phpAsim Siddiqui04/16/02 07:25
php4&mysqlsangyei04/11/02 21:12
Business Knowledge of PHP based websitesAZAM ABID SULTAN04/05/02 06:28
I need business KNowledge about PHP based webAZAM ABID SULTAN04/05/02 05:52
Using PHP on the web to load data into MYSQL Gareth Clough04/01/02 19:20
RE: testing variables received from PHP ??Adam D.04/01/02 16:56
Random end variable (is not unique for me)bishup03/29/02 18:30
RE: Another Flash,PHP,mySQL newbie with a problemsat03/29/02 06:29
testing variables received from PHP ??Arys03/29/02 06:08
Re: Flash Movie Keith Ganger03/27/02 16:08
All working, but how to tweak for me?Finn Beales03/27/02 06:12
Flash MovieCherie03/21/02 11:54
Another Flash,PHP,mySQL newbie with a problemHenry Rebus03/20/02 08:28
RE: How to build a database with PHP and Mysql?paul bennett03/19/02 22:09
ayuda "urgente"javier03/19/02 16:58
Flash for FreeBSDcchuang03/17/02 18:48
RE: flash php mysqlGiordano03/14/02 04:22
User LoginGreg03/13/02 22:54
RE: Any help would be greatly appreciatedCathy03/12/02 08:57
flash php mysqlCathy03/12/02 08:33
sending variables between 2 swf's w/ php&XMLCathy03/12/02 08:32
RE: How to build a database with PHP and Mysql?Kisaakye03/11/02 08:01
RE: Flash/PHP and telnetGiordano03/11/02 03:17
Flash/PHP and telnetBrett03/08/02 13:20
how i minimize my SWF file ???sajid 03/06/02 00:50
Any help would be greatly appreciatedAndy03/05/02 11:04
RE: Loadvariables not workingTim03/04/02 18:35
How to build a database with PHP and Mysql?Do Minh Duc03/04/02 01:39
Flash Generator 2Rudy03/03/02 14:23
Flash <-> PHP/MySQL via XMLSeKxX03/03/02 14:14
RE: Flash to PHP under netscape - PROBLEMBill Griffith03/03/02 10:39
problems with LOADVARIABLE()Rudy03/02/02 16:43
problems with LOADVARIABLE()Rudy03/02/02 16:33
RE: send me source php mysql and fla flashnano03/01/02 19:59
Flash to PHP under netscape - PROBLEMGeorge03/01/02 15:09
send me source php mysql and fla flashsayda02/26/02 23:50
RE: loadVariablesNum() vs loadVariables()veddermatic02/18/02 16:38
RE: Loadvariables not workingveddermatic02/18/02 16:28
RE: New Questionveddermatic02/18/02 16:25
RE: Scrolling w/ Buttons in flash..veddermatic02/18/02 16:16
controlling the browser windowoliver brooks02/15/02 20:19
New QuestionDrumminjoe02/13/02 16:02
Scrolling w/ Buttons in flash..Drumminjoe02/13/02 16:01
Scrolling with buttons...Joe Schroeck02/13/02 15:57
learning Flash Action ScriptBalamurugan02/13/02 09:19
RE: learning Flash Action ScriptEhsanShams02/09/02 06:51
RE: Loadvariables not workingDave02/09/02 00:26
HotlinkingLinda02/08/02 16:52
learning phpAnand02/07/02 21:14
RE: ArraysWaygood02/05/02 10:11
Loadvariables not workingAnita Kulkarni02/04/02 13:26
RE: loadVariablesNum() vs loadVariables()Patrick Mineault01/31/02 19:25
question!!!Fredrikphp01/31/02 08:45
arraysArys01/28/02 18:39
ArraysArys01/27/02 12:30
RE: learning Flash Action Scriptpoetics501/22/02 11:36
sessionshelp me please01/20/02 17:01
Another ways of PHP4/FLASH integration ...Ricardo01/20/02 14:22
RE: loadVariablesNum() vs loadVariables()Todd Burdeinei01/19/02 19:07
RE: loadVariablesNum() vs loadVariables()Todd Burdeinei01/19/02 19:06
RE: learning Flash Action ScriptEmory01/16/02 23:04
RE: learning Flash Action Scriptplease teach me how to use flash 01/16/02 21:38
RE: learning Flash Action ScriptTravis Reed01/15/02 20:54
status variableaggelos01/08/02 05:00
RE: graphic elementsHervé Chiron01/04/02 05:22
RE: learning Flash Action ScriptPhil Schroeder01/03/02 17:38
RE: learning Flash Action Scriptbernieda01/03/02 12:27
RE: learning Flash Action Scriptbernieda01/03/02 12:25
Security noteThomas Andersen01/02/02 04:57
RE: Knowing how to use Flashchris01/01/02 12:34
Conclusionudi landau12/24/01 02:55
graphic elementsudi landau12/24/01 02:48
loadVariablesNum() vs loadVariables()Christopher Currie12/20/01 16:36
loadVariablesNum() vs loadVariables()Christopher Currie12/20/01 16:36
RE: Knowing how to use Flashianholmes12/19/01 04:22
RE: RE: Knowing how to use FlashMike12/18/01 21:28
learning Flash Action ScriptRene Solis12/18/01 17:21
RE: Knowing how to use FlashCarlos12/18/01 11:56
RE: Knowing how to use FlashCarlos12/18/01 11:54
RE: Knowing how to use FlashCarlos12/18/01 11:54
Knowing how to use FlashBoris Barroso12/17/01 07:17
Knowing how to use FlashBoris Barroso12/17/01 07:17
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.