Jump to content

Need help with grabbing data


h3ktlk

Recommended Posts

 

Is it possible to echo a specific record in a MySQL table based on its ID column?

 

Im newer to all this, using php and mysql.. have table with about 50 rows of data, im trying to pull one field from say row 20 and put it in one section of the website, then trying to grab a field from row 42 and put somwhere else.

 

 

Been killing myself trying to echo a certain row or setup querys to let me do such.  Help please!

 

 

Link to comment
https://forums.phpfreaks.com/topic/52496-need-help-with-grabbing-data/
Share on other sites

mysql_select_db($database_sum_enrich, $sum_enrich);

$query_EventSession1K = "SELECT EventName FROM eventssession1 WHERE GradeK = 'yes' LIMIT 8";

$EventSession1K = mysql_query($query_EventSession1K, $sum_enrich) or die(mysql_error());

$row_EventSession1K = mysql_fetch_assoc($EventSession1K);

$totalRows_EventSession1K = mysql_num_rows($EventSession1K);

 

heres some of my code...  what would i place in echo to get it to get the output.

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.