Reply to Re: Thanks but problem again! Re: [PHP] PHP script problem (with MySQL)

Your name:

Reply:


Posted by Satyam on 04/20/05 09:54

I think that in your database it is :

substring(loc, 1, 3) as loc1

Anyway, the error is not where you are getting the message, the query failed
and this you don't have a valid resource to ask the number of rows or do
anything else. You should add an 'or die("message: " . mysql_error()) to
your query to trap the error.

Satyam


"Sugimoto" <sugimoto@momat.go.jp> wrote in message
news:005301c54556$29488650$d405a8c0@sugimoto...
> Thank you, Richard,
>
> I simply change this part
> (select * from openart_table) into
> (select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table)
> but Ive got this error, whats wrong with it?
>
> Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
> resource in c:\apache......\openart\test\openart_search.php on line 98
> Records Found
>
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> result
> resource in c:\apache....\openart\test\openart_search.php on line 100
>
> Cheers

[Back to original 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

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