You are here: how to get records from a parameter query in Access? « PHP SQL « IT news, forums, messages
how to get records from a parameter query in Access?

Posted by Bill on 02/04/06 12:27

Hi,

Our database is Access (i know, i would be better to use Mysql, but at the
present time, it's access ...) and i created a parameter query (like a
stored procedure in Mysql) for identification with name 'proctest'. The
criterium in the query is [na]. PHP must execute the query with the value of
variable 'name'.
I know how to use PHP with access using dynamic sql, but i don't know how to
do with a query.
Here is a attempt, but doesn't work.
Thanks for helping
Bill

<?php
name="bibi";
$db = 'c:\\mydb.mdb';
$conn = new COM('ADODB.Connection');
$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db");
$rs = $conn->Execute('proctest' na);
while (!$rs->EOF)
{
$lg=$rs->fields[0];
echo $lg;
echo "<br>";
$rs->MoveNext();
}
$rs->Close();
$conn->Close();
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация