FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Adding MSSQL support to a MySQL/Postgres script
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Adding MSSQL support to a MySQL/Postgres script [message #170123 is a reply to message #170081] Mon, 11 October 2010 11:06 Go to previous messageGo to previous message
DiamondEagle is currently offline  DiamondEagle
Messages: 11
Registered: October 2010
Karma:
Junior Member
On Oct 8, 11:34 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:

> I would suggest you start with
>
> echo "<pre>\n";
> print_r($tables);
> echo "</pre>\n";
>
> And take a look at the keys in your array.

Thanks. My problem seems to be that $tables is empty. When I debug
using print_r($tables) it shows that $tables is empty.

I'm "certain" that the problem is the line in the code below where
$tablename gets defined i.e
$tablename = trim($table['table_name']);

When I run the code with some added debug lines I see a few "failed
empty check" messages so the if(!empty($tablename)) check is saying
that $tablename is empty.

case 'mssql_n':
$query = mssql_query("select * from information_schema.tables");
if (mssql_num_rows($query) > 0) {
while ($table = mssql_fetch_assoc($query)) {
$tablename = trim($table['table_name']);
if (!empty($tablename)) {
echo "passed empty check<br />";
$tables[] = $tablename;
}
else {
echo "failed empty check<br />";
}
}
}
break;

And I don't know why!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cursor to 1st fllable field?
Next Topic: php://memory and php://temp
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 20:07:07 GMT 2024

Total time taken to generate the page: 0.04439 seconds