Subject | RE: [firebird-support] migrate mysql 5 php script to firebird 2.5 |
---|---|
Author | Hans |
Post date | 2012-10-23T18:20:30Z |
//Get records from database
$result = mysql_query("SELECT * FROM people;");
//Add all records to an array
$rows = array();
while($row = mysql_fetch_array($result))
{
$rows[] = $row;
}
=======================================================
I have something like this working
//Connect
$dbhandle =
ibase_pconnect'c:/supply/people.fdb', 'DBUserName'DBPassword')
or die('DBase access denied to' people.fdb '); //die(ibase_errmsg());
//Get records from database
$sql = ' SELECT * FROM people';
$result = ibase_query($dbhandle, $sql) or die(ibase_errmsg());
//Add all records to an array
$rows = array();
while($row = ibase_fetch_object ($result))
{
$rows[] = $row;
}
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Roberto Carlos
Sent: Monday, October 22, 2012 3:45 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] migrate mysql 5 php script to firebird 2.5
How could I convert the following php script from mysql to firebird?
//Get records from database
$result = mysql_query("SELECT * FROM people;");
//Add all records to an array
$rows = array();
while($row = mysql_fetch_array($result))
{
$rows[] = $row;
}
//Return result to jTable
$jTableResult = array();
$jTableResult['Result'] = "OK";
$jTableResult['Records'] = $rows;
print json_encode($jTableResult);
thanks for any help.
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
$result = mysql_query("SELECT * FROM people;");
//Add all records to an array
$rows = array();
while($row = mysql_fetch_array($result))
{
$rows[] = $row;
}
=======================================================
I have something like this working
//Connect
$dbhandle =
ibase_pconnect'c:/supply/people.fdb', 'DBUserName'DBPassword')
or die('DBase access denied to' people.fdb '); //die(ibase_errmsg());
//Get records from database
$sql = ' SELECT * FROM people';
$result = ibase_query($dbhandle, $sql) or die(ibase_errmsg());
//Add all records to an array
$rows = array();
while($row = ibase_fetch_object ($result))
{
$rows[] = $row;
}
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Roberto Carlos
Sent: Monday, October 22, 2012 3:45 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] migrate mysql 5 php script to firebird 2.5
How could I convert the following php script from mysql to firebird?
//Get records from database
$result = mysql_query("SELECT * FROM people;");
//Add all records to an array
$rows = array();
while($row = mysql_fetch_array($result))
{
$rows[] = $row;
}
//Return result to jTable
$jTableResult = array();
$jTableResult['Result'] = "OK";
$jTableResult['Records'] = $rows;
print json_encode($jTableResult);
thanks for any help.
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links