Jump to content

fog_2003

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

fog_2003's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am conecting to an Excel spreadsheet via php odbc_conn funtion.  It works but I have a list of room numbers like this in excel 1400 1401 1402 and when I retrieve the same numbers via php it comes out like this 1400.0 1401.0 I tried formatting the data differently in Excel and nothing happened.  Anyone know why this would be happening or how to reformat the variables in php.  Thanks
  2. I have a MySQL database and I am trying to retrieve multiple articles from it and parse it like this Article Title Article Content Article Title Article Content... When I retrieve the article contents and title I get a blank article title and a blank article content and then the article title and content I want I am using html br's to break up the article title from the article content, and the article content from the next title I was wondering it anyone knows what I am doing wrong in this code. This is the code [code]<?php // Query TblArticles mysql_select_db($database_conn_skatemanitowoc, $conn_skatemanitowoc) or die("Unable to Select Database"); $query_Articles = "Select * from TblArticles Order By ArtID Desc";//The Query $queryresults_Articles = mysql_query($query_Articles, $conn_skatemanitowoc) or die(QueryResults);//The Results $currentrow_Articles = mysql_fetch_assoc($query_Articles);//Current Row of the Loop, Used in the Do While Loop $totalRows_Articles = mysql_num_rows($query_Articles);//Total Number of Rows Returned by Query Result, Used in Do While Loop ?> <html> <head> </head> <?php do { ?> <?php echo $currentrow_Articles['ArtTitle']; ?><br> <?php echo $currentrow_Articles['ArtContent']; ?><br><br> <?php } while ($currentrow_Articles = mysql_fetch_assoc($queryresults_Articles)); ?> </html>[/code] And this is the result [code] <html> <head> </head> <br> <br><br> Test2<br> This is another test<br><br> Test<br> This is a test<br><br> </html> [/code]
×
×
  • 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.