[PHP] V basic newbie problem
I'm not sure if this is the right place for this but I'm just starting out with php and MySQL I have succesfully got a database up and I have managed to populate the first row of the html table with the first row of dynamic content without too much problem. I have used the visual enviroment of DW Mx for this and it was staightforward enough My problem arises when I want to fill in the subsequent rows of the table with the subesquent rows from the database. How do I create the recordset that will pull the info from the relevant subsequent rows for my columns? The code for the first row and first column entry is: ?php echo $row_RsSingStanDailybb['DailyBB']; ? but in the row below in the html table I want to refer to the second row DB entry for DailyBB but I cant see how to go about this:( The Repeat server behaviour in DW Mx simply puts all the values in one html cell which is not what I wish to achieve. Basically I want the html table to match the database but have only succeeded in getting the first row to display so far:( I'm sure this is simple but its my first time at all this and any help would be appreciated:) TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] V basic newbie problem
Put it in a WHILE loop and RTFM -Original Message- From: Duncan Ellwood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 9:44 AM To: [EMAIL PROTECTED] Subject: [PHP] V basic newbie problem I'm not sure if this is the right place for this but I'm just starting out with php and MySQL I have succesfully got a database up and I have managed to populate the first row of the html table with the first row of dynamic content without too much problem. I have used the visual enviroment of DW Mx for this and it was staightforward enough My problem arises when I want to fill in the subsequent rows of the table with the subesquent rows from the database. How do I create the recordset that will pull the info from the relevant subsequent rows for my columns? The code for the first row and first column entry is: ?php echo $row_RsSingStanDailybb['DailyBB']; ? but in the row below in the html table I want to refer to the second row DB entry for DailyBB but I cant see how to go about this:( The Repeat server behaviour in DW Mx simply puts all the values in one html cell which is not what I wish to achieve. Basically I want the html table to match the database but have only succeeded in getting the first row to display so far:( I'm sure this is simple but its my first time at all this and any help would be appreciated:) TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] V basic newbie problem
Sorry to crash in! One quick question! Does the VB script work on NON-IE browsers? FletchSOD Jay Blanchard [EMAIL PROTECTED] wrote in message 002601c222a0$8d8e7330$8102a8c0@niigziuo4ohhdt">news:002601c222a0$8d8e7330$8102a8c0@niigziuo4ohhdt... Put it in a WHILE loop and RTFM -Original Message- From: Duncan Ellwood [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 9:44 AM To: [EMAIL PROTECTED] Subject: [PHP] V basic newbie problem I'm not sure if this is the right place for this but I'm just starting out with php and MySQL I have succesfully got a database up and I have managed to populate the first row of the html table with the first row of dynamic content without too much problem. I have used the visual enviroment of DW Mx for this and it was staightforward enough My problem arises when I want to fill in the subsequent rows of the table with the subesquent rows from the database. How do I create the recordset that will pull the info from the relevant subsequent rows for my columns? The code for the first row and first column entry is: ?php echo $row_RsSingStanDailybb['DailyBB']; ? but in the row below in the html table I want to refer to the second row DB entry for DailyBB but I cant see how to go about this:( The Repeat server behaviour in DW Mx simply puts all the values in one html cell which is not what I wish to achieve. Basically I want the html table to match the database but have only succeeded in getting the first row to display so far:( I'm sure this is simple but its my first time at all this and any help would be appreciated:) TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] V basic newbie problem
try something like this echo 'table'; while( $result = mysql_fetch_array( $q ) ) { output here... } echo '/table'; S RAY HUNTER email: [EMAIL PROTECTED] www: http://www.venticon.com aim: spinebl8d3 - Original Message - From: Duncan Ellwood [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 03, 2002 8:43 AM Subject: [PHP] V basic newbie problem I'm not sure if this is the right place for this but I'm just starting out with php and MySQL I have succesfully got a database up and I have managed to populate the first row of the html table with the first row of dynamic content without too much problem. I have used the visual enviroment of DW Mx for this and it was staightforward enough My problem arises when I want to fill in the subsequent rows of the table with the subesquent rows from the database. How do I create the recordset that will pull the info from the relevant subsequent rows for my columns? The code for the first row and first column entry is: ?php echo $row_RsSingStanDailybb['DailyBB']; ? but in the row below in the html table I want to refer to the second row DB entry for DailyBB but I cant see how to go about this:( The Repeat server behaviour in DW Mx simply puts all the values in one html cell which is not what I wish to achieve. Basically I want the html table to match the database but have only succeeded in getting the first row to display so far:( I'm sure this is simple but its my first time at all this and any help would be appreciated:) TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] V basic newbie problem
[snip] Sorry to crash in! One quick question! Does the VB script work on NON-IE browsers? FletchSOD [/snip] VBscript works on ASP (Active Server Pages) servers...IIS most noteably, but you can get ChiliSOFT ASP for Linux and other *nix boxes. ASP can use VBscript, JSP, PerlScript, and other scripting languages. HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] V basic newbie problem
DE I'm not sure if this is the right place for this but I'm just starting out DE My problem arises when I want to fill in the subsequent rows of the table DE with the subesquent rows from the database. How do I create the recordset DE that will pull the info from the relevant subsequent rows for my columns? Depending on your SQL query, and assuming that you have checked for more than one row before coding accordingly, then the answer is to loop through your results using a combination of while and the mysql_fetch_array function. (or another mysql result function of your choice). That being said, without having seen your PHP code, we can't really tell you what exactly to do. This is a problem when using editors that help you to code. The basic concepts for accessing MySQL and retrieving records are all in the mysql area of the manual, or in tutorials abound. (including here: http://www.thickbook.com/extra/php_mysql.phtml) - Julie -- Julie Meloni -- [EMAIL PROTECTED] -- www.thickbook.com Find Sams Teach Yourself MySQL in 24 Hours at http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] V basic newbie problem
while($row = mysql_fetch_array($result_set)) { $field1 = $row['field1']; $field2 = $row['field2']; echo trtd width=\50%\\n; echo $field1\n; echo /tdtd width=\50%\\n; echo $field2\n; echo /td/tr\n; } This will cycle through the rows, adding the values of field1 and field2 to the respective variables, then outputting table rows accordingly. HTH Martin Duncan Ellwood [EMAIL PROTECTED] 07/03/02 10:43AM I'm not sure if this is the right place for this but I'm just starting out with php and MySQL I have succesfully got a database up and I have managed to populate the first row of the html table with the first row of dynamic content without too much problem. I have used the visual enviroment of DW Mx for this and it was staightforward enough My problem arises when I want to fill in the subsequent rows of the table with the subesquent rows from the database. How do I create the recordset that will pull the info from the relevant subsequent rows for my columns? The code for the first row and first column entry is: ?php echo $row_RsSingStanDailybb['DailyBB']; ? but in the row below in the html table I want to refer to the second row DB entry for DailyBB but I cant see how to go about this:( The Repeat server behaviour in DW Mx simply puts all the values in one html cell which is not what I wish to achieve. Basically I want the html table to match the database but have only succeeded in getting the first row to display so far:( I'm sure this is simple but its my first time at all this and any help would be appreciated:) TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] V basic newbie problem
On Wednesday, July 3, 2002, at 10:43 AM, Duncan Ellwood wrote: My problem arises when I want to fill in the subsequent rows of the table with the subesquent rows from the database. How do I create the recordset that will pull the info from the relevant subsequent rows for my columns? The code for the first row and first column entry is: ?php echo $row_RsSingStanDailybb['DailyBB']; ? but in the row below in the html table I want to refer to the second row DB entry for DailyBB but I cant see how to go about this:( The Repeat server behaviour in DW Mx simply puts all the values in one html cell which is not what I wish to achieve. Basically I want the html table to match the database but have only succeeded in getting the first row to display so far:( I haven't used DW Mx myself, I don't really like WYSIWYGs. But the way to do it is use a while loop. // $db = your connection parameters // $sql = your query if (!$result = mysql_query($sql, $db)) { die('The query failed for some reason'); } // this part goes through all the data in $result // and does something with that data on each iteration while ($row = mysql_fetch_assoc($result)) { echo $row_RsSingStanDailybb['DailyBB']; } Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] V basic newbie problem
DMX is a little shy on descriptions, but you want to use the Dynamic Table under the Application Section. I make these 5 times a day. -Original Message- From: Ray Hunter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 8:52 AM To: PHP GEN; Duncan Ellwood Subject: Re: [PHP] V basic newbie problem try something like this echo 'table'; while( $result = mysql_fetch_array( $q ) ) { output here... } echo '/table'; S RAY HUNTER email: [EMAIL PROTECTED] www: http://www.venticon.com aim: spinebl8d3 - Original Message - From: Duncan Ellwood [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 03, 2002 8:43 AM Subject: [PHP] V basic newbie problem I'm not sure if this is the right place for this but I'm just starting out with php and MySQL I have succesfully got a database up and I have managed to populate the first row of the html table with the first row of dynamic content without too much problem. I have used the visual enviroment of DW Mx for this and it was staightforward enough My problem arises when I want to fill in the subsequent rows of the table with the subesquent rows from the database. How do I create the recordset that will pull the info from the relevant subsequent rows for my columns? The code for the first row and first column entry is: ?php echo $row_RsSingStanDailybb['DailyBB']; ? but in the row below in the html table I want to refer to the second row DB entry for DailyBB but I cant see how to go about this:( The Repeat server behaviour in DW Mx simply puts all the values in one html cell which is not what I wish to achieve. Basically I want the html table to match the database but have only succeeded in getting the first row to display so far:( I'm sure this is simple but its my first time at all this and any help would be appreciated:) TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php