avoid fetching Duplicate column

Started on the old forum in May 2012 · view the original in the archive · old links redirect here

3 replies · 359 views · started 14 years ago · 1 min read

3 participants
shushant Developer · 207 posts #1

I have following data uk - 10 in 9 pk 9 gb 4 in 7 pk 7 I want to avoid Fetching Repeated column

is it

while($fh = $db -> fetch("SELECT country,request FROM table_n GROUP BY id HAVING count(country) <= 1")){
echo '".$fh[0]." ".$fh[1]."<br />';
}
output
uk - 10
in 9
pk 9
gb 4

right way to fetch only one Entry

shushant Developer · 207 posts #3

Matt_dowd91 wrote: yeah cant see why not

test it?:D

Hey I m Using cellphone dats make too hard to Import query so I can't So I Want suggestion

something else Fellow · 2,296 posts #4
while($fh = $db -> fetch("SELECT country,request FROM table_n GROUP BY country")){

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close