Jump to content


Photo

Mysql Query


  • Please log in to reply
3 replies to this topic

#1 gfmaking

gfmaking
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 28 June 2006 - 07:58 PM

please some one give me the query format, I will edit the security like password...
I want to get a query of all the fields i a table sorted by a date and the result I want it on a table format instead of comma delimmeted.

Thanks

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 28 June 2006 - 08:07 PM

Umm, no offense but could you put that in english? And explain in more detail about what you are trying to achive.

#3 gfmaking

gfmaking
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 28 June 2006 - 08:21 PM

Oppppps....OK

I have mysql database built & my Customers put data through HTML form by my pHP file to the database.
Now to diplay the result on an HTML formagain, I want a query but what i want is the result to desplay in a table format instead of just scramble on the sreen. Am i clear now?

Thanks for your help


#4 Buyocat

Buyocat
  • Members
  • PipPipPip
  • Advanced Member
  • 267 posts

Posted 28 June 2006 - 08:38 PM

Someone else had a similar question today, so try looking for it...

Anyway in a nutshell you want to do this...

$string = '<table>';
while ($data = mysql_fetc_array($result, MYSQL_NUM))
{
$string .= '<tr><td>' . $data[0] . '</td></tr>';
}
echo $string . '</table>';

I left out a lot, but I hope it is clear enough... that other post goes into more detail.

EDIT
I found the thread, so I'll give you the link. My post was has what you want in more detail, I believe.

[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=97058\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=97058[/a]
Looking for some easy-to-use tools?  Try these, https://sourceforge....jects/utils-php -- I made them myself.  They're distinct tools which are easy to understand and use.  See some examples uses at http://www.anotherearlymorning.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users