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 #170128 is a reply to message #170123] Mon, 11 October 2010 12:25 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 10/11/2010 7:06 AM, DiamondEagle wrote:
> 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!

So, what do you actually have in $table?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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: Wed Nov 27 08:47:01 GMT 2024

Total time taken to generate the page: 0.04661 seconds