INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Mimer with PHP3 & Pear

Mimer with PHP3 & Pear

(OP)
Has anyone had success using MIMER with the PEAR module for PHP? I have the following issue if anyone knows a reason.

PHP with Pear all seems to work well for me except that when refering to a field I have to use the index rather than the name.
ie, $row[0] rather than $row['FirstName']

This is probably a Pear glitch though.

Thanks
 

RE: Mimer with PHP3 & Pear

does using $row['FIRSTNAME'] work?

RE: Mimer with PHP3 & Pear

(OP)
No, using the name does not work. Obviously this is a Mimer forum so I will try a PHP one in case there is some other non-mimer reason. Same code below works on SQL Server.

I am printing each line of search results as follows.

echo $row['EmployeeID'];

Get the following error.

Notice: Undefined index: EmployeeID in C:\Applications...\scripts\search.php on line 40

The sql statement is:
$sql = 'SELECT EmployeeID, FirstName FROM Glossary_Web.Jobs WHERE LOWER(FirstName) LIKE ?';

So the fields are definitely there. If I use the following statement it works.

echo $row[0];

RE: Mimer with PHP3 & Pear

I meant that you should use upper case for the name. Mimer treats all identifiers (unless they are delimited) as upper case.

RE: Mimer with PHP3 & Pear

(OP)
Case of missing brain - left on holiday I suspect.
Forgot to get the $row as an associative array and have been staring at this one for far too long.

Using...
$row = $Result->fetchRow(DB_FETCHMODE_ASSOC)

then the keys would be the column names and $row['FIRSTNAME'] would work.

Swampboogie is certainly correct in that the key or column name must be in upper case.

Alternatively...

$row = $Result->fetchRow()

would get the column indexes as the keys and
$row[0] would work.

OK, now I can recommend PHP using PEAR with MIMER it's great and easy to use :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close