You are here: Re: Unable to see full result of mysql query in php « PHP Programming Language « IT news, forums, messages
Re: Unable to see full result of mysql query in php

Posted by Jerry Stuckle on 10/10/07 02:49

Terry wrote:
> Hi folks.
> I am just starting to dabble in php.
>
> I am trying to do some simple pagination in php/mysql.
>
> For whatever reason I am only getting the first digit of my result.
>
> For example:
>
> $result = mysql_query("select lamp_no from lamps as l where id=20");
> $row = mysql_fetch_array($result);
> echo "20 = " . $row[0]['l']
>
> only displays 1 it should have displayed 15 for me.
>
> Thanks,
> Terry
>

Yep. $row[0] is a string, containing the value of lamp_no. $row[0][1]
is a character in that string.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация