Computing.Net > Forums > Web Development > PEAR isn't returning every column

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

PEAR isn't returning every column

Reply to Message Icon

Name: ShaqDiesel
Date: May 21, 2008 at 19:39:51 Pacific
OS: winXP
CPU/Ram: amd64/1Gb
Product: custom
Comment:

Here's a row from my database table:
imageLink title author pages category
Images/a.jpg a book joe 100 cooking

while($result_row = $result->fetchRow(DB_FETCHMODE_ASSOC))
{
echo $result_row['imageLink'] . "<br />;
echo $result_row['title'] . "<br />" .
echo $result_row['author'] . "<br />" .
echo $result_row['pages'] . "<br />" .
echo $result_row['category'];
}

Title and category have values, but not author or pages! I am baffled because I am connected to the right database and according to phpmyadmin those columns are filled with values.



Sponsored Link
Ads by Google

Response Number 1
Name: ShaqDiesel
Date: May 21, 2008 at 19:47:22 Pacific
Reply:

I double checked and my column values that I used in my associative array are exactly as they look in the database, capitalization and all.

This is really weird because I used PEAR in default mode(with numbers as indices) first and was getting missing values and the indices didn't match the values. For example, $result_row[2] was referring to the category column value.


0

Response Number 2
Name: ShaqDiesel
Date: May 21, 2008 at 21:39:09 Pacific
Reply:

nevermind, I needed to fix my sql query.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: PEAR isn't returning every column

Php Search www.computing.net/answers/webdevel/php-search-/4067.html

PHP search function www.computing.net/answers/webdevel/php-search-function/2121.html

Javascript to save last page viewed www.computing.net/answers/webdevel/javascript-to-save-last-page-viewed/1659.html