Re: [PHP-DB] difference !!??

2002-02-07 Thread Daniel Ems

Bart,

See this page for an explanation of quotes inside array brackets:

http://www.php.net/manual/en/language.types.array.php

Basically, the correct way to do it is to _always_ use quotes (single
quotes for strings without variables, and double quotes for strings with
variables).  So your example below should use format #2 since there are no
variables to expand.  Format #1 below is deprecated, and I can attest to
weird behavior when you use $row[$column_name] without double quotes.  
Hope this helps!

Daniel Ems


On Thu, 7 Feb 2002, B. Verbeek wrote:
 Hello,
 
 What's the difference between:
 
 1.- $row[column_name];
 2.- $row['column_name'];
 3.- $row[column_name];
 
 ?
 
 ragards Bart
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] :: Problems With Interbase :: Please Help ::

2001-12-14 Thread Daniel Ems

Hi Vins,

Have you tried the database path without .. (i.e. 
/path/to/database/NAMES.GDB)?

Have you tried defining the database like this? 
localhost:/path/to/database/NAMES.GDB

I'm not sure these will work, but they are worth trying.

Daniel Ems


On Fri, 14 Dec 2001, Vins wrote:

 Hi.
 I need help with Interbase.
 Here is my script...
 
 *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
 
 ?php
 $database = ../../interbase_data/NAMES.GDB;
 $username = ADMIN;
 $password = ;
 
 $dbh = ibase_connect ($database, $username, $password);
 $stmt = 'SELECT * FROM name';
 $sth = ibase_query ($dbh, $stmt);
 while ($row = ibase_fetch_object ($sth)) {
  echo $row[first].nbsp;.$row[last].BR\n;
 }
 ibase_close ($dbh);
 ?
 
 *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
 
 The php manual says that the $database variable must be the full path the
 database file if it's location is on the localhost.
 Now as you can see i've done that but i keep getting this dumb messages
 saying Undefined Database.
 Please could any one help me.
 I have no clue what to do.
 I've been sitting for 2 days now and I've finally turned to the newsgroup.
 Please Please.
 
 Thanx
 Vins
 [EMAIL PROTECTED]
 Text Me: +27721807050
 
 
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]