Jump to content

Trying to connect to mySql


NLCGraphics

Recommended Posts

Hi All,

Can anyone tell me if they see anything wrong with this class?

 

<?php

class Tutorials
{
public function __construct()
{
	mysql_connect("localhost:8889", "root", "root");
	mysql_select_db("firstdb");
}

public function getTutorials()
{
	$myresult = mysql_query("SELECT * FROM firstDb");
	$t = array();



	while($row = mysql_fetch_assoc($myresult))
	{
	array_push($t,$row);	

	}
return $t;
}

 

 

It produces this error in flash AS3:

 

Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion
at zendTest_fla::MainTimeline/frame1()

 

any help would be great.

 

Thanks,

Sky

Link to comment
https://forums.phpfreaks.com/topic/174730-trying-to-connect-to-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.