PHP - Need Help To Limit Number Of Rss Feed Entries Via Php/xml
Hello,
I have a real estate website, a rss feed and I use feedburner for email subscriptions etc. Since last week, feedburner is not working anymore cause it says that my feed is larger than 512 KB. Well, i would like to change the code of the feed in order to display only the last 200 items (now we have 300), but i tried many ways and didnt have any luck Another solution would be setting a minimum date for publishing the items, for example to set the feed to publish items only if their publication date was after a particular month or day. here is my code, can you help me to limit number of items, please? Thanks in advance <?php defined('_JEXEC') or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); class PropertiesViewProperties extends JView { function display($tpl = null) { global $mainframe; $db =& JFactory::getDBO(); $document =& JFactory::getDocument(); $params =& $mainframe->getParams(); $document->link = JRoute::_('index.php?option=com_properties&view=properties'); $document->setMetaData('description',JURI::base()); // Get some data from the model JRequest::setVar('limit', $mainframe->getCfg('feed_limit')); $query = ' SELECT p.*,c.name as name_category,t.name as name_type,cy.name as name_country,s.name as name_state,l.name as name_locality,pf.name as name_profile,pf.logo_image as logo_image_profile, ' . ' CASE WHEN CHAR_LENGTH(p.alias) THEN CONCAT_WS(":", p.id, p.alias) ELSE p.id END as Pslug,' . ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as Cslug,' . ' CASE WHEN CHAR_LENGTH(cy.alias) THEN CONCAT_WS(":", cy.id, cy.alias) ELSE cy.id END as CYslug,' . ' CASE WHEN CHAR_LENGTH(s.alias) THEN CONCAT_WS(":", s.id, s.alias) ELSE s.id END as Sslug,' . ' CASE WHEN CHAR_LENGTH(l.alias) THEN CONCAT_WS(":", l.id, l.alias) ELSE l.id END as Lslug, ' . ' CASE WHEN CHAR_LENGTH(t.alias) THEN CONCAT_WS(":", t.id, t.alias) ELSE t.id END as Tslug ' . ' FROM #__properties_products AS p ' . ' LEFT JOIN #__properties_country AS cy ON cy.id = p.cyid ' . ' LEFT JOIN #__properties_state AS s ON s.id = p.sid ' . ' LEFT JOIN #__properties_locality AS l ON l.id = p.lid ' . ' LEFT JOIN #__properties_profiles AS pf ON pf.mid = p.agent_id ' . ' LEFT JOIN #__properties_category AS c ON c.id = p.cid ' . ' LEFT JOIN #__properties_type AS t ON t.id = p.type ' . ' WHERE p.published = 1 ' .' ORDER BY p.id DESC' ; $db->setQuery( $query ); $prod = $db->loadObjectList(); foreach ( $prod as $row ) { // strip html from feed item title $title = $this->escape( $row->name ); $title = html_entity_decode( $title ); // url link to article $link = LinkHelper::getLink('properties','showproperty','',$row->CYslug,$row->Sslug,$row->Lslug,$row->Cslug,$row->Tslug,$row->Pslug); // strip html from feed item description text $image_name=$this->Images($row->id); //print_r($image_name); //require('a'); $image = '<img width="200" align="left" alt="'.$item->title.'" src="'.JURI::base().'images/properties/images/thumbs/'.$row->id.'/'.$image_name.'"/>'; $category = ' '.JText::_('Category').': <b>'.$row->name_category.'. </b>'; $desc = '<br>'.'<br>'.'<div align="center" style="border: 1px solid red; margin: 10px; padding: 20px;">'.$row->text.'</div>'; $description = $image.$category.$type.$ref.$desc; $description = $this->escape( $description ); $description = html_entity_decode( $description ); $listdate = $row->listdate; // load individual item creator class $item = new JFeedItem(); $item->title = $title; $item->link = $link; $item->description = $description; $item->date = $listdate; $item->category = $row->name_category; $item->type = $row->name_type; // loads item info into rss array $document->addItem( $item ); } } function Images($id) { $db =& JFactory::getDBO(); $query = ' SELECT i.name ' . ' FROM #__properties_images as i ' . ' WHERE i.published = 1 AND i.parent = '.$id . ' order by i.ordering LIMIT 1'; $db->setQuery($query); $Images = $db->loadResult(); return $Images; } } ?> Similar TutorialsMy php and MySQL scripting works perfectly, but when someone enters data into the php form, using an iPad with Safari browser, all number entries are inserted into the database table incorrectly. It is still a number entry but the number differs substantially from the original input. Note: All other entries, where the individual selects something from a drop-down list and date selecter works perfectly from the same form. Please help me here, since at least 70% of my employees use iPads, thus I need to find a cure for this problem ASAP. Thanks in advance for any help offered. JayDude Hello, I am using the following code to display images managed by a MySQL database. Basically another program manages a bunch of images, but this script displays certain ones (ones with INCLUDE = 1 in the database) on my main page. My question is, is there an easy way to limit the number of images it displays, say to 5? I'm not too concerned which images actually display (ascending or descending)... or better yet, random! Most importantly, I only want five to display. Each image will be linked to the full page, which displays all the images. Any ideas? Thanks! Code: [Select] <?php $username="XXXXXXX"; $password="XXXXXXX"; $database="XXXXXXX"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM ft_form_12 WHERE col_24='1'"; // $query="SELECT * FROM ft_form_12"; // SELECT * FROM ft_form_12 WHERE col_24='1' $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); ?> <?php $i=0; while ($i < $num) { $f20=mysql_result($result,$i,"col_23"); //Photo file name $f21=mysql_result($result,$i,"col_24"); //INCLUDE ?> <a href="http://www.domain.com/display_whole_page.shtml"><img src="http://www.domain.com/the_file/pictures/<?php echo $f20; ?>" height="50" border="0"></a> <?php $i++; } ?> aim: to create a page where after a set number of pageviews/hits (from any ip) it redirects to a set url permanently. (if it's easier with a different language do say) thanks in advance my coding is displaying all result in only one page.i want to limit it to 50result per page..can anyone give the suitable coding? right now,im using this <?php do { ?> <?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?> <tr bgcolor="#CCCCCC"> <td height="21"><div align="center"><span class="style17"> <?php $count=$count + 1; echo $count; ?> </span></div></td> <td><div align="center" class="style17"><?php echo $row_Recordset1['id']; ?></div></td> <td><div align="left" class="style17"><?php echo $row_Recordset1['name']; ?></div></td> <td><div align="center" class="style17"><a href="staf_info.php?id=<?php echo $row_Recordset1['id']; ?>"><img src="pic/b_view.png" width="16" height="16" border="0" /></a></div></td> <td><div align="center" class="style17"><a href="kemaskini_staf.php?id=<?php echo $row_Recordset1['id']; ?>"><img src="pic/b_edit.png" width="16" height="16" border="0" /></a></div> <div align="center" class="style17"></div></td> <td><div align="center" class="style17"><a href="staf_delete.php?id=<?php echo $row_Recordset1['id']; ?>"><img src="pic/b_drop.png" alt="padam" width="16" height="16" border="0" /></a><a href="staf_delete.php?id=<?php echo $row_Recordset1['id']; ?>"></a></div></td> </tr> <?php } // Show if recordset not empty ?> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
I want to run this loop until it has created 50 or a 100 links, max. At present it continues running even though no inputs are being added to the database. I suspect, it keeps looping through and collecting duplicates and then not adding them to the database. I see this as two options, I either limit the number of loops or must find someway for the pages that have already been crawled to be skipped. I am busy doing a php course and the lecturer is not answering questions about how the code could be improved. I figure that if you are going to do something in a training course it should be able to do what it needs to and if it doesn't it needs a little alteration. function followLinks($url) { global $alreadyCrawled; global $crawling; global $hosta; $parser = new DomDocumentParser($url); $linkList = $parser->getLinks(); foreach($linkList as $link) { $href = $link->getAttribute("href"); if((substr($href, 0, 3) !== "../") AND (strpos($href, "imagimedia") === false)) { continue; } else if(strpos($href, "#") !== false) { continue; } else if(substr($href, 0, 11) == "javascript:") { continue; } $href = createLink($href, $url); if(!in_array($href, $alreadyCrawled)) { $alreadyCrawled[] = $href; $crawling[] = $href; getDetails($href); } } array_shift($crawling); foreach($crawling as $site) { followLinks($site); } Edited January 29 by guymclarenza added info Hey folks! Happy what ever you are celebrating I am trying to limit the number of characters to 200 that this array echos. I have tried a few things... I have tried using "substr($arr_tem, 0, 200)" but obviously it is not working... but I think I am close-ish. Any assistance would be great! Code: [Select] ###print array### echo (implode(", ", array_keys($arr_tem))); Thanks! Unless buffer overflows or breaking out of code to perform a new command are problems that have been solved.... I am trying to figure out the proper PHP method for setting a boundary on a variable within a script. I have this variable $name which is fed a value from $_POST['name'] from a form field. Now this form field is limited in the HTML to accept only 20 characters, but someone could easily edit the form or outgoing post data. So I want to know how to limit the variable size in the script. In other languages it could be something like this: var name(20). So how do I do that in PHP? I'm getting the dreaded " Invalid parameter number: number of bound variables does not match number of tokens" error and I've looked at this for days. Here is what my table looks like:
| id | int(4) | NO | PRI | NULL | auto_increment | | user_id | int(4) | NO | | NULL | | | recipient | varchar(30) | NO | | NULL | | | subject | varchar(25) | YES | | NULL | | | cc_email | varchar(30) | YES | | NULL | | | reply | varchar(20) | YES | | NULL | | | location | varchar(50) | YES | | NULL | | | stationery | varchar(40) | YES | | NULL | | | ink_color | varchar(12) | YES | | NULL | | | fontchosen | varchar(30) | YES | | NULL | | | message | varchar(500) | NO | | NULL | | | attachment | varchar(40) | YES | | NULL | | | messageDate | datetime | YES | | NULL |Here are my params: $params = array( ':user_id' => $userid, ':recipient' => $this->message_vars['recipient'], ':subject' => $this->message_vars['subject'], ':cc_email' => $this->message_vars['cc_email'], ':reply' => $this->message_vars['reply'], ':location' => $this->message_vars['location'], ':stationery' => $this->message_vars['stationery'], ':ink_color' => $this->message_vars['ink_color'], ':fontchosen' => $this->message_vars['fontchosen'], ':message' => $messageInput, ':attachment' => $this->message_vars['attachment'], ':messageDate' => $date );Here is my sql: $sql = "INSERT INTO messages (user_id,recipient, subject, cc_email, reply, location,stationery, ink_color, fontchosen, message,attachment) VALUES( $userid, :recipient, :subject, :cc_email, :reply, :location, :stationery, :ink_color, :fontchosen, $messageInput, :attachment, $date);"; And lastly, here is how I am calling it: $dbh = parent::$dbh; $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); if (empty($dbh)) return false; $stmt = $dbh->prepare($sql); $stmt->execute($params) or die(print_r($stmt->errorInfo(), true)); if (!$stmt) { print_r($dbh->errorInfo()); }I know my userid is valid and and the date is set above (I've echo'd these out to make sure). Since the id is auto_increment, I do not put that in my sql (though I've tried that too), nor in my params (tried that too). What am I missing? I feel certain it is something small, but I have spent days checking commas, semi-colons and spelling. Can anyone see what I'm doing wrong? Hello,
I have problem durring binding update query. I can't find what is causing problem.
public function Update(Entry $e) { try { $query = "update entry set string = $e->string,delimiter=$e->delimiter where entryid= $e->id"; $stmt = $this->db->mysqli->prepare($query); $stmt->bind_param('ssi',$e->string,$e->delimiter,$e->id); $stmt->close(); } catch(Exception $ex) { print 'Error: ' .$ex->getMessage(); } }When I run function update I'm getting next error:Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement Can you help me to solve this problem ? Edited by danchi, 17 October 2014 - 10:25 AM. I need to display a number(the number is retrieved from the db) in the form input field such that only the last 4 digits is visbile, the remaining can be masked as * or X or whatever is applicable. I know the last 4 can be obtained as follows: Code: [Select] $number=substr($number,-4,4); But when i hit the submit button the form validates the input field and checks if the number is a valid number of a specific format. Therefore when I click on the submit button then I should still be able to unmask the masked numbers or do something similar that would help me validate the whole number. Code: [Select] <input type="text" name="no" value="<?php if(!empty($number)){ echo $number;} ?>"> the problem is that when I add an item to be displayed in the blog, shows three instead, which two are empty. It should not create three entries when I just add one entry. How can I fix this? <?PHP /* define the blog content file name */ $filename = "myBlogContent.txt"; ?> <?php /* check to see if the file exists */ if (!file_exists($filename)) { echo "The Blog Is Empty"; }else{ /* get the file lines into an array */ $BlogArray = file($filename); /* count the number of blog entries */ $count = count($BlogArray); $i=0; while($i<$count) { $new_array = explode("|", $BlogArray[$i]); echo "Posted by: " . $new_array[1] . "<br>"; echo "Posted on: " . date("m/d/y h:iA", time($new_array[0])) . "<br>" echo "Title: " . $new_array[2] . "<br>"; echo $new_array[3] . "<hr>"; $i ++; } } ?> <?PHP /* obtain the form data */ $who = $_POST['who']; $title = $_POST['title']; $content = $_POST['content']; $content = str_replace(array("\r\n", "\r", "\n"), "<br>", $content); /* create timestamp variable for current date and time */ $when_ts = time(); /* define the blog content file name */ $filename = "myBlogContent.txt"; /* prepare the variables for adding to the file */ $new_line_content = $when_ts . "|" . $who . "|" . $title . "|" . $content . "\n"; /* open the file in the APPEND MODE */ $fh = fopen($filename, 'a+') or die("can't open file"); /* add the new content */ fwrite($fh, $new_line_content); /* close the file */ fclose($fh); //exit; // Closes further script execution . ?> Below is the part of my code that creates the html table. How do I add pagination every 30 entries? $db = mysql_connect("localhost","trend_learnu","asdfasdf"); mysql_select_db("trend_learningdb",$db); $result = mysql_query("SELECT * FROM Peoples ORDER BY number ASC"); $table = '<table width="608" border="0" align="center" cellpadding="10" cellspacing="0"> <tr> <td style="color:#fff;" width="207" bgcolor="#425d74"><strong>Firstname</strong></td> <td style="color:#fff;" width="204" bgcolor="#425d74"><strong>Lastname</strong></td> <td style="color:#fff;" width="197" bgcolor="#425d74"><strong>Date</strong></td> <td style="color:#fff;" width="197" bgcolor="#425d74"><strong>Weight</strong></td> </tr>'; while($row=mysql_fetch_array($result)) { $firstname = $row['Firstname']; $lastname = $row['Lastname']; $weight = $row['Weight']; $date = $row['Date']; $table.= '<tr>'; $table.= '<td bgcolor="#e8f4ff">'.$firstname.'</td>'; $table.= '<td bgcolor="#e8f4ff">'.$lastname.'</td>'; $table.= '<td bgcolor="#e8f4ff">'.$date.'</td>'; $table.= '<td bgcolor="#e0ffe6"><strong>'.$weight.'</strong></td>'; $table.= '</tr>'; } $table .= '</table>'; echo $table; mysql_close($con) Hey I have a string that looks like the following: Quote top-php-tutorials-2.html I have a script that cycles through each page. The 2 in the quote above is the page number. How can I extract the number between the - and the .html and replace it with another number? I've tried Code: [Select] substr($engine->selectedcaturl, 0,-6).$v.".html"But then I realised this only works for numbers that are 1 digit long Any input would be appreciated Hello, For starters I'm not sure if what I want to do is possible, but if it is I would like your input. I have a script that will show a number of fields to fill out in a second form based on the number the user puts into the first from. the problem is that only the last one saves into the database and not all of them. Code: [Select] <form auction="index.php" method="post"> System Name: <input type="text" name="systemname"> Number of E-sites: <input type="text" name="events"> Number of Sigs: <input type="text" name="sigs"><br> <input type="reset" name="reset" value="Reset"> <input type="submit" name="start" value="Start"> </form> <form auction="index.php" method="post"> <?php $events = $_POST['events']; $system = $POST['systemname']; if (isset($_POST['start'])) { $num = $_POST['sigs']; $i = 0; While ($i < $num) { echo "Sig ID: <input type=text name=sigid>"; echo "Type: <input type=text name=type>"; echo "Name: <input type=text name=name>"; echo "Notes: <input type=text name=notes>"; echo "<br>"; $i++; } } ?> <input type="submit" name="enter" value="Enter"> </form> <?php $sigid = $_POST['sigid']; $type = $_POST['type']; $name = $_POST['name']; $notes = $_POST['notes']; mysql_connect('xt', 'x', 'x'); mysql_select_db('wormhole'); if (isset($_POST['enter'])) { $query = "INSERT INTO sites VALUES ('$system','$events','$sigid','$type','$name','$notes')"; mysql_query($query); } ?> How do I get it so all the data saves, lets say that $num = 5, I want all 5 to save not just the last one. Code: [Select] $query = mysql_query("SELECT a.*, b.* FROM friendlist a INNER JOIN friendlist b ON (a.friendemail=b.friendemail) INNER JOIN users c ON (b.friendemail = c.EmailAddress) WHERE a.email = 'asdf@gmail.com' AND c.Username LIKE '%carol%' GROUP BY a.id ORDER BY count(*) DESC"); Code: [Select] while ($showfriends = mysql_fetch_array($query)) { echo $showfriends['Username']; } and I would get nothing. It produces the correct number of <div> so i know it's getting through, but it's having trouble displaying the entries? Is there any other way of getting PHP form data into C# any other way besides calling www.downloadHandler.text I am having issues bringing all the entries into C# and breaking them all up. I can do one row fine but multiple rows isn't working. I keep getting an out range error. This is my PHP echo echo $row['userName']. '|' .$row['level']. '|' .$row['points']. '|' .$row['killRate']. '/'; And this is my C# code string nothing = "Not Placed"; string Data_string = www.downloadHandler.text; string[] DataArray; DataArray = Data_string.Split('/'); int numberOfEntries = DataArray.Length; Debug.Log(numberOfEntries); if (DataArray[0] == null || numberOfEntries == 1) { DataArray[0] = nothing; Debug.Log("Data Array [0] isn't there"); High_Points_1.text = DataArray[0]; } else { High_Points_1.text = DataArray[0]; //Debug.Log(DataArray.Length); } if (DataArray[1] == null || numberOfEntries == 2) { DataArray[1] = nothing; Debug.Log("Data Array [1] isn't there"); High_Points_2.text = DataArray[1]; } else { High_Points_2.text = DataArray[1]; //Debug.Log(DataArray.Length); } if (DataArray[2] == null || numberOfEntries == 3) { DataArray[2] = nothing; Debug.Log("Data Array [2] isn't there"); High_Points_3.text = DataArray[2]; } else { High_Points_3.text = DataArray[2]; } if (DataArray[3] == null || numberOfEntries == 4) { DataArray[3] = nothing; Debug.Log("Data Array [3] isn't there"); High_Points_4.text = DataArray[3]; } else { High_Points_4.text = DataArray[3]; } if (DataArray[4] == null || numberOfEntries == 5) { DataArray[4] = nothing; Debug.Log("Data Array [4] isn't there"); High_Points_5.text = DataArray[4]; } else { High_Points_5.text = DataArray[4]; } I have two entries in the database. But when I debugged the number int he array I get 3 strings. I want to show the top five entries in the database. I have an issue with some code I have. All the code works correctly apart from when submit is clicked not only does it update a the current club but it creates a blank entry in the database! I cant see whats wrong. Here is the code......... //gets $validation = $_GET['new_club']; //Querys $qGetClub = "SELECT * FROM clubs WHERE validationID = '$validation'"; $rGetClub = mysql_query($qGetClub); $Club = mysql_fetch_array($rGetClub); //Query for category by name $qGetCat = "SELECT * FROM club_category WHERE catID = ".$Club['cat'].""; $rGetCat = mysql_query($qGetCat); $CatName = mysql_fetch_array($rGetCat); //query for related sub categorys. $qGetSub = "SELECT * FROM sub_categorys WHERE catID =".$Club['cat'].""; $rSubCat = mysql_query($qGetSub); // query for groups created $Groupq = mysql_query("SELECT * FROM groups WHERE memberID = '".$User['memberID']."'"); //end of querys if(isset($_POST['insert_clubbtn1'])){ //Process data for validation $subcat = trim($_POST['subcat']); $NewSubCat = trim($_POST['NewSubCat']); //Prepare data for db insertion $subcat = mysql_real_escape_string($subcat); //find the new category //insert $result = mysql_query("UPDATE clubs SET `sub_category` = '$subcat' WHERE validationID ='$validation'") or die(mysql_error()); if ($result!=="") { $otherg = trim($_POST['other_groups']); $newg = trim($_POST['new_group']); $newg = mysql_real_escape_string($newg); //if an item other than none from the list is selected then update the club with an ID relating to the group it belongs to if ($otherg !=='None') { $groupsq = mysql_query("UPDATE `clubs` SET groupID ='$otherg' WHERE validationID ='$validation'") or die (mysql_error()); } // If none is selected then $newg must have a value so create a new group in the groups table and then on the next page I will add the group in the club table else { $groupsq = mysql_query("INSERT INTO `groups` (`memberID`, `group`, `clubID`) VALUES ('".$User['memberID']."', '$newg', '".$Club['clubID']."')")or die (mysql_error()); } } if ($NewSubCat !="") { mail("mail","New Sub Category Request","Dear Ring Master, \n\nThe club in the name of $name with a validation code of $validationID would like a new sub category called $new_cat\n\n \nTeam Arena\n\n\n\n"); } $url = "/members/create/create_clubp3.php?new_club=$validation"; header("Location: $url"); } I am quite new so I am sure this is an easy fix for some of the experts around here. I am using the canned script below to add urls to the database as text. The problem is if you update one of the form text boxes it loads all the urls into the database again resulting in a lot of duplicates. My question is, How do I get the form to only post the new changes and not re-post the existing urls? <?php session_start(); if(isset($_SESSION['userSession']) && !empty($_SESSION['userSession'])) { include_once("dbc.php"); if($_POST) { $c = 0; $errMssg = ""; for($i=0;$i<count($_POST['url']);$i++) { if($_POST['url'][$i]=="") { $c++; } } if($c==5) { $errMssg = "Submission error . Please fill at least 1 url."; } else { for($j=0;$j<count($_POST['url']);$j++) { if(!empty($_POST['url'][$j])) { $sql = mysql_query("INSERT INTO images (id ,url ,user_id)VALUES (NULL , '".$_POST['url'][$j]."',".$_SESSION['userId'].")"); } } } } $sqlresult = mysql_query("SELECT * FROM images WHERE user_id =".$_SESSION['userId']); $count = 0; while($data = mysql_fetch_array($sqlresult)) { $image[$count] = $data['url']; $count++; } ?> So, I've been trying to get this query working and can't quite get it to work. I'm trying to get an "array" of distinct browsers from the database, but it's only showing one of them. There are 3 unique browsers in the table and only "Chrome 30" gets returned. Here is the query:
SELECT DISTINCT `browser` AS `unique_browsers`, COUNT(DISTINCT `ip`) AS `unique_visitors`, COUNT(DISTINCT `country`) AS `unique_countries`, COUNT(`id`) AS `total_count`, (SELECT COUNT(`id`) FROM `table` WHERE `browser` LIKE '%Chrome%') AS `chrome_count`, (SELECT COUNT(`id`) FROM `table` WHERE `browser` LIKE '%Internet Explorer%') AS `ie_count`, (SELECT COUNT(`id`) FROM `table` WHERE `browser` LIKE '%Firefox%') AS `firefox_count`, (SELECT COUNT(`id`) FROM `table` WHERE `browser` LIKE '%Safari%') AS `safari_count`, (SELECT COUNT(`id`) FROM `table` WHERE `browser` LIKE '%Opera%') AS `opera_count`, (SELECT COUNT(`id`) FROM `table` WHERE `browser` NOT LIKE '%Chrome%' AND `browser` NOT LIKE '%Internet Explorer%' AND `browser` NOT LIKE '%Firefox%' AND `browser` NOT LIKE '%Safari%' AND `browser` NOT LIKE '%Opera%') AS `unknown_count` FROM `table` GROUP BY `browser`Everything works properly except the line: Hello. How can I have a single form which has a number of standard fields in it, say date and name.... but for that same date and name I want to add multiple additional entries for say phone calls recieved... (silly example I know) How can I enter the standard data once and an undefined amount of phone calls received ? without having to put a maximum number of possible entry fields on the page.... ? So, say my Form is : <form action="myform.php" method="post"> <p>Date: <input type="text" date="date" /><br /> Name: <input type="text" name="name" /></br> Call From: <input type="text" call_from="call_from" /></br> <p><input type="submit" value="Send it!"></p> </form> If I have 50 calls for that person I only want to enter their name and the date once and then add as many calls as needed... How can I do it? Thanks |