LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] php

[ILUG] php

Kae Verens kae at verens.com
Tue May 31 13:17:06 IST 2005


Nils Olofsson wrote:

>I using this php snipit to return a table entry that matches 10
>$query="SELECT title,news from news_post where id=10";
>$result=standard myslq connect stuff here.
>then I have 
>while($row=mysql_fetch_array($result){
>standard php stuff here
>}
>
>The id is an INT,but what i'm getting back is every record that is in the mysql table.
>running the query on the mysql console return only one entry so it can't be mysql.
>It seems that if i use differnet variables query1,query2 and so on each 
>page then it works and returns only what i ask for,I have even used
>mysql_free_result($result);
>mysql_close($link);
>at the end of each page to make sure that the database connection is
>closed,i've even put at the start of each page query=0; and query="";
>Global variables are turned off in the config so is there anything else
>i should be looking at?
>  
>

sounds like there's a typo somewhere. can you past the actual source 
(minus sensetive bits) ?

Kae




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell