PHP - Requesting Suggestion About My Programming Future
Hello guys,
I require a suggestion about how shall I proceed as when I am about to set a goal for my future in programming world, Just so that you could suggest me better, I urge you to please read about a little background history of mine. And please stay neutral in regards of language, dont say PHP because you are a PHP developer and dont say Java because you are a Java developer.
Thanks.
I stepped into programming when I was in school (below A-levels at 14, now I am 29) and I started to bunk school and went to internet cafe and would sit there reading sources of HTML pages in year 2000. I would observe their programming styles, I would learn about the tags they used and then search internet (it was IE6 then and Yahoo searching at its peak) so I could learn about it.
Years passed, and having my family related to medical professions, I took admission in Pharmacy in University and quit after 2 years and entered working class. My development slowed down but passion always stayed the same.
Now I am in Spain and working as a technician of mobile repairing with a company, but I still have this passion of programming and when I learn that etc etc friend of mine now is working with CISCO in Germany, now is working as a game developer in America, I become really sad. I could have been one of those. But the fact is that I am not. So I restarted again with development and started learning PHP on my work desk using online resources and tutorials and asking silly questions.
Nothing I could become but an obsolete language programmer with a mess.
Now when I havent been able to become someone, till now, I still have passion and I want to be somewhere.
-----------------------------
I am confused for some days now, shall I continue with PHP (apart from the fact that i am a MYSQL learner, haven't learned PDO or MYSQLi till now) or shall I step into Java learning, using the online resources ofCourse, but if I step into Java, It will be a fresh start and I will be able to organize it better on my way with guidance of professionals like you.
The Things confusing me: (as I am imagining in my mind)
PHP:
A great web development language being used on billions of website, have an extraodinary support, well documented, World is moving online, so future is e-commerce in these terms.
JAVA:
Feels a giant to me, and impresses me at times, a myth to me, I am speaking illogical I know, and after android, I see a great potential in this language.
Edited by Digitizer, 28 August 2014 - 06:03 PM. Similar TutorialsHi: I am trying to request an id to do a transfer back to a page, but am having difficulties. This is on a page where a person can add a new section, which gets assigned a unique id. I am trying to send the user to the page where they can edit the new page, once it has been created. Like this: a_websiteDataADD.php Code: [Select] <?php $id = $_REQUEST['id']; ?> ... <script language="JavaScript"> alert("The new section was added!"); location.href = "a_websiteData.php?id=[id]"; </script> What am I missing on this ?? Hi
What is the best recommended way to "sort through" and "place certain data" into a sql table?
For example, I create a input form.php
Company Name:
The Blah CompanyProduct/Industry Dedicated ServersHTML Source Code <div class="allservers"> <div class="serverType" id="server1"> <div class="myFeaturesBox"> <ul class="tabination"> <li><a href="#" class="activeTab" data-tab='feature'>FEATURED</a></li> <li><a href="#" data-tab='single'>SINGLE PROCESSOR</a></li> <li><a href="#" data-tab='dual'>DUAL PROCESSOR</a></li> <div class="clear"></div> </ul> <div class="feature myTab activeTabs"> <table class="table"> <tr> <th></th> <th>Processor</th> <th>RAM</th> <th>Hard Drive</th> <th>Price/Mo</th> <th></th> <th></th> </tr> <tr> <td><img src='img/server.png' alt='Server' width="20" height="20" /></td> <td>Intel Xeon E3-1230 (4x3.2GHz)</td> <td>8 GB DDR3</td> <td>1x500 GB SATA</td> <td>$98.00</td> <td><a href="https://portal.securedservers.com/wap-jpost3/UP011013E31230" target="_self"><img src='img/deploy.png' alt='Deploy Now' width="86" height="18" /></a></td> <td class="wB"></td> </tr> <tr> <td><img src='img/server.png' alt='Server' width="20" height="20" /></td> <td><div style="position:relative;">Intel Xeon E3-1240 v3 (4x3.4GHz)</div></td> <td>8GB DDR3</td> <td>1x1 TB SATA</td> <td>$128.00</td> <td><a href="https://portal.securedservers.com/wap-jpost3/UP031013E31240" target="_self"><img src='img/deploy.png' alt='Deploy Now' width="86" height="18" /></a></td> <td class="wB"></td> </tr> <tr> <td><img src='img/server.png' alt='Server' width="20" height="20" /></td> <td><div style="position:relative;">Intel Xeon E3-1240 v3 4-bay (4x3.4GHz)</div></td> <td>8GB DDR3</td> <td>4x500 GB SATA</td> <td>$148.00</td> <td><a href="https://portal.securedservers.com/wap-jpost3/UP431013E31240" target="_self"><img src='img/deploy.png' alt='Deploy Now' width="86" height="18" /></a></td> <td class="wB"></td> </tr> <tr> </table>Submit Button --> sends to the "sorting process?" than into proper DB tables for search query. Ultimately, there I require to be able to pull from my DB upon query, pricing, hardware, processor, etc.. Any recommendation for me to try? I'm new to PHP but I want to learn and do it myself (better after effect feeling than paying someone) Hi there,
I have a question, which I seem to be unable to find out myself;
I have my own webshop (coded by myself), and trying to add multiple configurable options into it, each option having their own stock limit.
Here is the problem:
I am trying to implement AJAX for the following:
Lets say: Customer wants Product A with Config 1: A, Config 2: C and Config 3: C
Lets say config 1 is length, Config 2 is design of the product, and config 3 is the dimension of the product.
Config 1 Option A has 12 items in stock
Config 2 Option C has 7 items in stock
Config 3 Option C has 1 item in stock.
Here is my question:
How do I implement AJAX to check all these variables (so lets say: You have Config A with Option A (12 stock) B (16 stock) and C(109 stock), etc, and when she selects for example Config 3 Option C, that she can ONLY order 1 of the items, and if she tries to put the order in higher (in the selector) that it sais that with the current configuration only 1 order can be made?
This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=351526.0 Hi all. I have been trying something for 2 days, having no success and was hoping someone could help. I know this is a long post but it's mostly just php code below. I'm trying to do "pagination" for a script that I came across. First of all.. I am not a programmer in any way. I didn't even know what pagination was until 2 days ago when I was trying to explain what I wanted in a forum and was educated. So.. off to Google I went. I found all kinds of "free pagination" script articles with "how-to's". Well.. I think you need to at least have an idea of how to program becuase I've tried 4 now and failed every time. Or... maybe I'm just the world's worst at understanding programming concepts (very possible). I really have spent just hours and hours trying to make pagination happen.. to no avail. So.. if you know an easier way, please share! Or.. If you care to read on and help with the pagination script I've been trying to make work, that would be awesome. Either way, I would be most grateful! Here's what I got and what I've tried.. My index.php page: Code: [Select] <?php include_once('inc_dbcon.php'); require_once('admin/config.php'); require_once($languageFile); // Preview descrition length in characters $previewLength = 240; // check to see if in admin mode and validate key global $keyOut; $keyOut = ""; if (isset($_GET["k"])) if($_GET["k"] == $key){ // Key comes from admin/password.php file $keyOut = "&k=" . $key; } global $category; $category = "%"; if (isset($_GET["category"])) $category = mysql_real_escape_string($_GET["category"]); $msg = ""; if (isset($_GET["msg"])) $msg = mysql_real_escape_string($_GET["msg"]); // SEARCH CODE START $searchQuery = ""; if (isset($_GET["q"])) $searchQuery = mysql_real_escape_string($_GET["q"]); if ($searchQuery != "") { $query_Recordset1 = "SELECT postId,category,title,description,isAvailable,description,price,confirmPassword,category,imgURL,imgURLThumb,DATE_FORMAT(timeStamp,'%b %d, %Y %l:%i %p') AS timeStamp1 FROM md_postings WHERE isConfirmed = '1' AND title like '%$searchQuery%' OR description like '%searchQuery%' ORDER BY `timeStamp` DESC"; } else { $query_Recordset1 = "SELECT postId,category,title,description,isAvailable,description,price,confirmPassword,category,imgURL,imgURLThumb,DATE_FORMAT(timeStamp,'%b %d, %Y %l:%i %p') AS timeStamp1 FROM md_postings WHERE isConfirmed = '1' AND category like '$category' ORDER BY `timeStamp` DESC"; } // SEARCH CODE END - see also line 113 below $maxRows_Recordset1 = 100; $pageNum_Recordset1 = 0; if (isset($_GET['pageNum_Recordset1'])) { $pageNum_Recordset1 = mysql_real_escape_string($_GET['pageNum_Recordset1']); } $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1; $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1); $Recordset1 = mysql_query($query_limit_Recordset1); if (!$Recordset1){ print("It appears we have a problem: " . mysql_error()); exit(); } $row_Recordset1 = mysql_fetch_assoc($Recordset1); if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = mysql_real_escape_string($_GET['totalRows_Recordset1']); } else { $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1); } $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1; $queryString_Recordset1 = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Recordset1") == false && stristr($param, "totalRows_Recordset1") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams)); } } $queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="md_style.css" rel="stylesheet" type="text/css" /> <script language="JavaScript"> function doFilter(dis) { window.location.href = "index.php?category=<?php echo $category ?>&type=" + dis.value + "<?php echo $keyOut;?>" } </script> </head> <body> <?php include_once("inc_navigation.php") ;?> <div id="md_container"> <?php if ($msg == "deleted") print("<br clear='all' /> <div class='md_msg' style='margin-top:-10px;'>" . STR_DELETED ."</div>"); ?> <br clear="all" /> <div id='md_listingBox'> <?php if($totalRows_Recordset1 < 1) { // SEARCH START new Code - added IF statement to support search if ($searchQuery != "") echo "<p><br /><br /><br />" . STR_NORESULTS . "<b>" . $searchQuery ."</b></p>"; else echo "<p><br /><br /><br />" . STR_NOITEMS . "</p>"; // SEARCH END NEW CODE } else { do { $img = "/images/gift_light.gif' title='This is a gift!'"; $type = $row_Recordset1['type']; $isAvailable = $row_Recordset1['isAvailable']; $isAvailableClass = ($isAvailable == 0) ? 'md_taken' : ''; $thumbnail = ' '; if (strlen($row_Recordset1['imgURLThumb']) > 3){ $thumbnail = "<a href='viewItem.php?id=" . $row_Recordset1['postId'] . "' class='md_recordLink " . $isAvailableClass . "'>"; $thumbnail .= "<img src='" . $row_Recordset1['imgURLThumb'] . "' class='md_thumbnail' border='0'></a>"; } ?> <table width="100%" border="0" cellpadding="4" class="md_listingTable"> <tr> <td width="54" align="center"><?php echo $thumbnail; ?></td> <td valign="top"> <div class='md_date'><?php echo $row_Recordset1['timeStamp1'];?></div> <a href="viewItem.php?id=<?php echo $row_Recordset1['postId'] . $keyOut;?>" class='md_recordLink<?php echo $isAvailableClass; ?>'><?php echo stripslashes($row_Recordset1['title']); ?></a> — $<?php echo $row_Recordset1['price']; ?> <br /> <?php echo stripslashes(substr($row_Recordset1['description'],0,$previewLength)); ?>... </td> </tr> </table> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); } // end else clause ?> </div> </div> <?php include_once("inc_footer.php");?> </body> </html> <?php mysql_close($dbConn); ?> Here's the inc_dbcon.php file that it calls to connect: Code: [Select] <?php // Change these to be for your database $dbhostname = "localhost"; $dbname = "justtes1_123"; $dbusername = "justtes1_12"; $dbpassword = "abc12"; if(!$dbConn = mysql_connect($dbhostname, $dbusername, $dbpassword)) die('I could not connect to the database. Clease check the inc_dbcon file and make sure everything is correct.'); if(!mysql_select_db($dbname, $dbConn)) die('I could not select the database. Check the inc_dbcon file and make sure everything is correct.'); ?> I've trying to use the pagination script from: http://www.phpeasycode.com/pagination/ Here's the "usage example" that is in the pagination script: Code: [Select] <?php $rpp = 10; // results per page $adjacents = 4; $page = intval($_GET["page"]); if($page<=0) $page = 1; $reload = $_SERVER['PHP_SELF']; // connect to your DB: $link_id = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error()); mysql_select_db($dbname, $link_id); // select appropriate results from DB: $sql = "SELECT * FROM table_name WHERE table_field LIKE '%search string%' ORDER BY field_name"; $result = mysql_query($sql, $link_id); // count total number of appropriate listings: $tcount = mysql_num_rows($result); // count number of pages: $tpages = ($tcount) ? ceil($tcount/$rpp) : 1; // total pages, last page number $count = 0; $i = ($page-1)*$rpp; while(($count<$rpp) && ($i<$tcount)) { mysql_data_seek($result,$i); $query = mysql_fetch_array($result); // output each row: echo "<p>" . $query['table_field_1'] . ", " . $query['table_field_2'] . "</p>\n"; $i++; $count++; } // call pagination function: include("paginate.php"); echo paginate_three($reload, $page, $tpages, $adjacents); ?> The pagination script also comes with a demo.php. I uploaded that and it works just great. But.. when I try to incorporate the above usage into my index.php, I fail miserably. So.. If you prefer, I can copy index.php with what I've tried.. which is apparently very wrong. The page I tried it in is he http://justtesting.freehosting.com/indexPaginate.php So.. if anyone is able to tell me how they'd incorporate the usage script into the index.php, that would solve my 2 day dilemna and I would be eternally grateful. If you want to login to my test version (feel free to edit as this is purely a test site), it's he http://justtesting.freehosting.com/ ftp host: 62.75.203.94 FTP Username: justtes1 FTP Password: JpxF34j80h A HUGE thanks for anyone who can help! I have tried everything for hours and hours.. I'm developing a javascript widget to display on other people's websites that will have a php file(on my hosting account) as its source. Is there a way for php to get the domain of the site that is requesting the php file? I want the user to be able to specify if they want the widget to only display on their website. So i would store the user's domain name in my db and then write in the php script to check to see if the website requesting the widget matches whats in my db...if so display widget...if not..don't. Hey everyone, I'm new to this forum and I came here looking for some help with PHP. I've just started getting into PHP and you guys are probably a smile ahead. So basically, I have some inputs and want them to be sent to my email in a basic layout shown below. Code: [Select] Inputs: Title = _title Forum Name = _forumname Name = _irlname Age = _age I want the email to be sent to me like: Code: [Select] Email Title --------------- Forum Name: TextGiven Real Life Name: TextGiven Age: TextGiven Here is my current code which titles the email correctly, but I want to figure out how to make $message set to the example email I showed above. Code: [Select] <?php $to = "******@*********.net"; $subject = $_REQUEST['_title']; $headers = "From: ***** Applicant \r\n"; $headers .= "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=\"iso-8859-1\"\r\n" . "Content-Transfer-Encoding: 7bit\r\n"; $message = $_REQUEST['_forumname' & '_irlname']; <--- Part I want fixed if(mail($to, $subject, $message, $headers)) { echo 'MAIL SENT'; } else { echo 'MAIL FAILED'; } ?> I have this code, and it works. But I want $message = "" to make the message contain not just the forum name, but as well as the name, age, and all other inputs I want. Ok so I am writing a CMS to wrap around a company script I wrote a while back. I am having trouble requesting dynamic form names. Heres the code to generate the input fields: $fields = mysql_result($result,$i,"fields"); $exFields = explode(",", $fields); for($i = 0; $i < count($exFields); $i++){ echo "$exFields[$i] : <input type=\"text\" name=\"$exFields[$i]\"> <br>"; } Ok so it generates the fields the way I want. (design crap will be done later) But I am having issues on processing the form, for example: Fields get generated -> Client Fills them in -> Submitted into our already built function. The function takes those form values and creates an XDF file with the correct requested values. But like I said I am having issues requesting the form values because they wont be static they will differ depending on each PDF. Can anyone point me in the direction on how to get the form values? Hi Everyone, This is Tamilmani Mohan , i have few doubts in SQL Stored Procedure. I am able to run the SQL SP using odbc driver and also get the result set. For Example: odbc_exec($connection,"exec get_Members"); I don't know how to run the input / output parameters SP's? Example:- If i run the below code by using SQL Management Visual Studio, I am able to insert to new record and get the member id and error code values. declare @MemberId int,@Error int EXEC INSERT_MEMBER 1,'Tamilmani','Mohan','Address1', 'Address2', 'Address3','Salem','Tamilnadu','India',9993234234 , @MemberId OUTPUT , @Error OUTPUT SELECT @MemberId , @Error I don't know how to run this type code in PHP ODBC ? Kindly , please any one give me good suggestion for this problem ? Thanks Tamilmani Mohan Hello. I wanted to make a table where the dates are listed going forward at least one year. So, at least 365 records, but each date should be unique and should start from today until one year from now. I tried to make a date column and make it a primary key.
However, an error comes up when I try to insert more than one record. This is for a calendar that I'm building so I need the dates listed one year in advance and it would be great if new dates could be added without my having to manually go in there and insert new records to stick to my 1 year in advance rule.
For that aspect I might have to create a php script where the date records are added every time a user logs in, to make sure they are up to date, but anyways what I don't understand is why I can't make a table with 1 year of date records in advance, where each row has a unique date starting from today.
Evening All, How would I go about selecting a future date based on a date? What I want to achieve is to take todays date, add ten days to it and then store it as the month end following that date. For example 19th Nov + 10days = 29th November = 31st Dec Many thanks for any pointers! Hello! I've managed to solve that the content is shown AFTER 6 hours when added to the SQL. But I want to add many things on the same (current time) but I don't want everything to pop up after 6 hours. I want a 6 hour delay on EACH content I add. How do I solve this? Here is my code: $six_hours_ago = time() - 21600; $sql = "SELECT * FROM Trailers WHERE Genre LIKE '%".$_GET['show']."%' AND time < '".$six_hours_ago."' ORDER BY `Trailers`.`sort` DESC"; insert.php $sql="INSERT INTO Trailers (Poster, Title, Year, Genre, IMDB, Actors, Plot, Youtube, time) VALUES ('".mysql_real_escape_string($_POST['Poster'])."','".mysql_real_escape_string($_POST['Title'])."','".$_POST['Year']."','".mysql_real_escape_string($_POST['Genre'])."','".$_POST['IMDB']."','".mysql_real_escape_string($_POST['Actors'])."','".mysql_real_escape_string($_POST['Plot'])."','".$_POST['Youtube']."', '".time()."')"; Thanks! What are your feelings regarding Linux desktop distros, and their ability to break through to mainstream usage? I started using Ubuntu about 6 or 7 years ago, and have fooled around with some other distros, but at least for me Ubuntu always seemed the best. I've got my 65 year old mom using it, and my 11 year old son playing with Kubuntu (and learning python!). I don't really consider us normal though; normal being almost too dumb to do more than check email and get on the internet.
I've managed to fully switch over to Ubuntu on all of my computers, with the exception of running Windows in a VM for Photoshop and Illustrator. Since I don't use those programs every day, there are a lot of days where I don't see Windows. I never really had a problem with Windows, except for Windows 3.1 was kind of a drag. Getting on the internet on a 56K modem on Windows 95 wasn't any fun either, but that wasn't Windows' fault. I never had the crashes and bad experiences people like to claim makes Windows suck. My main reason for abandoning Windows is just to be more involved with Linux, and hopefully reach Linux guru status someday.
I really never liked Macs. I bought one 3 or 4 years ago, and it just felt like I was paying a lot of money for a glorified (and over-hyped) linux distro. I really never liked the feel of the Finder. At the time there was no awesome text editor, and I bought a couple just to test out what I could find. Unlike Windows and Linux, it seemed like nothing is free in the Mac world. I eventually gave the Mac away. We couldn't be friends.
I'd really like to see Linux become the dominant OS. It's exciting to see how far Ubuntu has come in the years that I've used it, and I evangelize for Linux/Ubuntu quite a bit. Even still, it can sometimes seem that I am a stranger in a strange world. Do you think we can count on Linux being a bigger part of mainstream computing? One of the problems I see is that there are so many distros that a person investigating Linux may be a little overwhelmed. What do you think is keeping the masses from using Linux desktops?
Hi, I am using this function to output a list of dates for every friday over the next 12months. This is working fine. Code: [Select] [php] //function function nextWeeksDay($date_begin,$nbrweek) { $nextweek=array(); for($i = 1; $i <= $nbrweek; $i++) { // 52 week in one year of course $nextweek[$i]=date('Y-m-d', strtotime('+'.$i.' week',$date_begin)); } return $nextweek; } /// end function /// example of a select date // var $date_begin=strtotime('this Friday'); $nbrweek=52; // call function $result=nextWeeksDay($date_begin,$nbrweek); // Insert //$date1=date('Y-m-d', $date_begin); for($i = 1; $i <= $nbrweek; $i++) { //$date=$result[$i]; echo $result[$i]."<br/>"; } [/php] My problem is that when I alter the code to try and get the date for every second Friday for the next year the script freezes. Code: [Select] [php] //function function nextWeeksDay($date_begin,$nbrweek) { $nextweek=array(); for($i = 2; $i <= $nbrweek; $i+2) { // 52 week in one year of course $nextweek[$i]=date('Y-m-d', strtotime('+'.$i.' week',$date_begin)); } return $nextweek; } /// end function /// example of a select date // var $date_begin=strtotime('this Friday'); $nbrweek=52; // call function $result=nextWeeksDay($date_begin,$nbrweek); // Insert //$date1=date('Y-m-d', $date_begin); for($i = 2; $i <= $nbrweek; $i+2) { //$date=$result[$i]; echo $result[$i]."<br/>"; } [/php] I really don't understand why?? Does anyone know why? Thanks Hi, I want to calculate the future month, i have used following code to calculate the date $date = date('Y-m-d',strtotime(date("Y-m-d", strtotime('2010-01-31')) . " +3 month")); It gives me 2010-03-03 But i need to get 2010-02-28 OR just month is enough like 2010-02 Thank you Nikhil Hi everyone, I'm writing a science fiction wordpress blog set 10 years into the future. I basically need all posts to display as if they are 10 years from now. Eg. posts needs to display as: February 7, 2021 instead of February 7, 2011 This will be for every post that I write. How can I automatically add 10 years to every post date? (And where would I put that code?) Currently, the wordpress php is calling the date with `<?php the_time(__('M j, Y')) ?>` I realise it's a bit of an odd request, but it's necessary for this particular project. I know it's possible - but I'm brand new to php and am not sure how. =) I hope someone out there can help. It would be very much appreciated. many thanks in advance Luke It would be cool if when you hover over someone's thread a brief popup window appears showing a snippet of what is inside so a person can easily decide whether or not to click on a thread, I realize that could lower the potential "clicks" which in turn would lower the potential revenue from ads but...
It would be cool if when you hover over someone's thread a brief popup window appears showing a snippet of what is inside so a person can easily decide whether or not to click on a thread, I realize that could lower the potential "clicks" which in turn would lower the potential revenue from ads but...
Hello, i Want the following code and the Variable $page To load a file in a folder. And get all of its contents. How would i do this? <?php $page = "{$_GET['page']}"; if(md5($_GET['page'] == '')) { } ?> I was wondering if there was a way to have the MAX function NOT return a Date that is more than 2 days into the future (from the current day)? If there is a Date that is more than 2 days into the future I would like to return the one closest to the current day. Here is the code I have: Code: [Select] <?php mysql_connect("local", "xxx", "xxx") or die(mysql_error()); mysql_select_db("pricelink") or die(mysql_error()); // Get a specific result from the "ft9_fuel_tax_price_lines" table $query ="SELECT ItemNumber,TableCode,Cost, MAX(`Date`) as `max_date`, MAX(`Time`) as 'max_time' FROM `ft9_fuel_tax_price_lines` GROUP BY `ItemNumber`,`TableCode`"; $result = mysql_query($query) or die(mysql_error()); echo "<table border='1'>"; echo "<tr> <th>ItemNumber</th> <th>TableCode</th> <th>Date</th> <th>Time</th> <th>Cost</th> </tr>"; // keeps getting the next row until there are no more to get while($row=mysql_fetch_array($result)) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['ItemNumber']; echo "</td><td>"; echo $row['TableCode']; echo "</td><td>"; echo $row['max_date']; echo "</td><td>"; echo $row['max_time']; echo "</td><td>"; echo $row['Cost']; echo "</td></tr>"; } echo "</table>"; ?> Any help would be appreciated. Thanks! |