Jump to content

how to show data ...in....


nec9716

Recommended Posts

ok now that I'm able to create table in sql

and able to write in it

and able to look in it

 

 

when I ask to look inside table it show me the data but all in line which now I put <BR> between each entry

 

but even that how can I do to have that one row after another with 2 different color each row?

and how can I do to get the date in straight column ?

 

you don't have to write me the script ....but just a  clue where I can look ...I kind of turn in round since few HRS to do that

 

thank's everyone...

have a great day

Link to comment
https://forums.phpfreaks.com/topic/96718-how-to-show-data-in/
Share on other sites

....ok but ...you might not know but ..that just my second day in PHP...so how can I get this snippet working with this:

 

<?php

$db = mysql_connect('localhost','user','pass');

mysql_select_db('matnphil_f1',$db);

$sql='SELECT id, name, teamname, driver1, driver2, driver3, chassis, engine, tiebreak1, tiebreak2 FROM player';

$req = mysql_query($sql)or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());

while($data = mysql_fetch_assoc($req))

{

echo ''.$data['id'].''.$data['name'].''.$data['teamname'].''.$data['driver1'].''.$data['driver2'].''.$data['driver3'].''.$data['chassis'].''.$data['engine'].''.$data['tiebreak1'].''.$data['tiebreak2'].'<br>';

}

mysql_close();

?>

 

even with the alternating color ...I have no clue at all how to set my PHP script with "" $x=0""

Link to comment
https://forums.phpfreaks.com/topic/96718-how-to-show-data-in/#findComment-494963
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.