Page 1 of 1

help me to do this code

Posted: Thu Sep 15, 2005 12:42 pm
by saad
hi
i think alot of about phpcode do show rows of one column from mysql and rows must be link when click on it show the opposite row from next column from same table under the link which click on it before.
the last of my try is show rows of column without be link .

the code do that is

/* Connecting, selecting database */
$link = mysql_connect('localhost', 'root', '')
or die('Could not connect : ' . mysql_error($link));

mysql_select_db('email', $link)
or die('Could not select database');

/* Issue SQL query */
$query = 'select url from email';
$result = mysql_query($query, $link) or die('Query failed : ' . mysql_error($link));
[/b]

Posted: Thu Sep 15, 2005 3:13 pm
by s.dot
Hmm, I really couldn't understand what you're trying to ask =/

But it sounds like you're wanting to loop to show more rows?

Code: Select all

while($array = mysql_fetch_array($result))
{
  // your rows are now here
  echo $array[0];
  echo $array[1];
  echo $array['field'];
  echo $array['field2'];
}

Posted: Thu Sep 15, 2005 6:05 pm
by feyd
yar needs to be postin' code like scrotaye does, yar.. Reading the first link in my signature, you should, matey.

Posted: Thu Sep 15, 2005 7:32 pm
by boniggy
feyd wrote:you should, matey.
shouldnt it be "ye" should, matey? :lol:

Posted: Thu Sep 15, 2005 7:41 pm
by feyd
boniggy wrote:shouldnt it be "ye" should, matey? :lol:
aye, me's a poor pi-rate...

yarrr