hello me again:) There is a page in my cms that users can see my posts there and i want to limit the number of posts that must be shown to users in each page and paginate. This is my code: <?php $servername = "localhost"; $dbname = "mydbname"; $dbusername = "mydbusername"; $dbpassword = "mydbpassword"; try { $conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbusername, $dbpassword); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $number = ""; if(isset($_POST['submit'])) { $sql = "SELECT ID, Title, Author, Content FROM Posts LIMIT" . $_POST['number'] . ", 3"; $result = $conn->query($sql); foreach($result as $row) { echo $row['ID'] . ") "; echo "<a href='single-post-page.php?post=" . …

Member Avatar
Member Avatar
+0 forum 20

Hello again. How can i limit my list indexes? I want my list to take only 3 indexes for example.

Member Avatar
Member Avatar
+0 forum 7

Hi Guys, I am new to XSLT, looking to solve a problem I am facing in filtering XML records. I need to get both the Input XML record position and limit the output XML to a particular number (based on input provided to xsl:param from .net 1.1) Input XML <Parent> <Child>AAA</Child> <Child>ABA</Child> <Child>DAA</Child> <Child>DBAA</Child> <Child>BZA</Child> </Parent> Output XML(Required) <table> <tr> <td id="Row{Position of the record in Input XML}> node value </td> </tr> </table> Eg: SearchParam='D' and Output Limit=1 if I am searching for one text starting with 'D', the output should be <table> <tr> <td id="Row3>DAA</td> </tr> </table> I am …

Member Avatar
Member Avatar
+0 forum 2

I have no idea how to write in Python. Please help me with this! Best answer if you write the program! Central Limit Theorem I Goal Write a python program that will use your accept / reject Monte Carlo algorithm to demonstrate the central limit theorem. Recall: The central limit theorem states that if s = ∑j=1 N xj (ie. s is a sum of M random variables x1, ..., xM), then the distribution of s approaches a Gaussian distribution as M increases. Here the index j is being used to indicate different variables. Furthermore, the mean of the resulting …

Member Avatar
Member Avatar
-3 forum 5

Hi, I need to implement list based on dynamic arrays (second task is to implement as double linked list). Both tasks are done, but I have problem with time limit on test platform when values are millionths. I suppose that resizing dynamic array is delaying so much. I have implemented common list methods as push_front(), pop_back() ... For example: void push_front(int x) { size++; int* tab_temp = new int[size]; memcpy(tab_temp + 1, tab, (size - 1) * sizeof(int)); tab_temp[0] = x; delete [] tab; tab = tab_temp; } I thought about change resizing step from 1 to 10, but I …

Member Avatar
Member Avatar
+0 forum 5

hi to all webmaster! :D how can i say that im successful in my SEO strategy if i just have small targeting community? how to measuring & tracking success of your SEO strategy? how to compare my ranking to others?

Member Avatar
Member Avatar
+0 forum 3

Hello, guys.. I am actually working on a project. I can't figure out how to limit the displayed content on a table of a particular data. I have a table (tblservices) that have fields (service_id, service_name, service_content, date_created).. *the service_name* is the title of the service, *service_content* is the whole description and guideline of the service. Now, I want to display all the data on tblservices (SELECT * FROM tblservices) in a table. I succesfully displayed all the data on the table, but on the column of service_content, I just want to display a short part of the service_content not …

Member Avatar
Member Avatar
+0 forum 7

Is there away to limt cftextarea by word not characters? I need to limit my form to 250 words. is there a way to do this?

Member Avatar
Member Avatar
+0 forum 8

Hello Community, I was wondering if there is a way to limit users on how many database entries they can insert then once they have reached 100 (Max entried) entries it will delete old entries. So if the user has reached 100 entried and they try to insert another entry it will delete and old entry to make room for there entry.

Member Avatar
Member Avatar
+0 forum 7

I know that I can limit a query by 10 for instance, and have the top rows returned, but I have a situation where I want to return all rows, but I want to be able to mark the rows that fall in the top 10 a certain way. For instance, let's say we have the following tables table: fruit id int 11 name vchar 100 table: persons id int 11 name vchar 100 table: owned_fruit id int 11 fruit_id int 11 person_id int 11 I want to show a listing using the owned fruit table, show a count grouped …

Member Avatar
Member Avatar
+0 forum 6

not able to upload more then 2 mb of file in php i m using post method

Member Avatar
Member Avatar
+0 forum 2

i would like to know hot to put a limited input in a textbox.. situation is like this i put a textbox in a form then what i would like to happen is to accept only 2 number and will not accept the following number that is being pressed...please help... newbie here!

Member Avatar
Member Avatar
+0 forum 2

Is there any chance that a set of rules could be implemented to prevent abuse of the endorsement system? It seems that currently, anyone can endorse anyone and there is no restriction. I can provide an example of what appears to be abuse of the system, however, I am against naming in public so please PM me (Dani/Deceptikon you're the only guys I know reputibly) I would like to propose that only active contributors can endorse and that this should have a minimum threshold. You should also only be able to endorse if you have a minimum amount of reputation. …

Member Avatar
Member Avatar
+2 forum 8

In this code, I need to put a limitation in every part where the user is asked to input data. The user will be asked to input a grade ranging from 50-100, and if his input is not in the range, the program will display a warning, and if the user inputted the wrong range 3 times, the program will terminate. What should be the proper way? I can't get it right when I use iteratives. code: #include<stdio.h> #include<conio.h> main () { float csPrelim, prelimExam, prelimGrade; float csMidterm, midtermExam, midtermGrade; float csFinals, finalsExam, finalsGrade; int username,userpass; int a; a = …

Member Avatar
Member Avatar
+0 forum 1

#include <iostream> #include <stdlib.h> //For system() #include <conio.h> //For getche() #include <time.h> using namespace std; //You can modify these numbers but don't delete these constants or this starting code will not work const int MAX_HEIGHT = 20; //The height of the grid const int MAX_WIDTH = 40; //The width of the grid /******************************************************************** * Class: PickUpGame * Purpose: To store the grid and the current x and y position of the * user. Also has memeber functions to intialize the grid and print it. * Allows the user to move around the grid but provides no out of * bounds …

Member Avatar
Member Avatar
-1 forum 2

I'm getting this error in one of my scripts: **You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-25,25' at line 1** Below is part of the code any help would be great <?php ; // Initializing the message to hold the error messages if(isset($_GET['searchid']) && $_GET['searchid'] != "") { $searchid = $_GET['searchid']; $query = mysql_query("SELECT * FROM search WHERE id = '$searchid'"); $row = mysql_fetch_array($query); $search = $row['term']; $Limit = 25; //Number of results per page $searchin = $row['searchin']; $cats = $row['cats']; $orderby …

Member Avatar
Member Avatar
+0 forum 3

SELECT t.* FROM (SELECT * FROM jobs WHERE `status` IN (0,1,2,3) ORDER BY `status` DESC, job_datetime LIMIT 11, 20) AS t That's a cut down sample of my sql. It was more complicated, but I've pared it down to this just to see why I was getting some strange numbers for pagination (e.g. 10 records per page). The above returns 12 records. With the LIMIT clause on the outside, it works as expected, but that's not something I'm able to do as I need to limit the subquery for additional joins later on. Can somebody shed some light on this …

Member Avatar
Member Avatar
+0 forum 3

i have tow tables, posts and sections, i want to get the last 10 posts WHERE section = 1, but use the 10 results in different places, i make a function function sectionposts($section_id){ mysql_set_charset('utf8'); $maxpost1 ="SELECT max(id) from posts WHERE section_id = $section_id ORDER BY ID DESC LIMIT 10"; $maxpost10 =mysql_query($maxpost1); return($maxpost10); } $query2 = sectionposts(6); while ($rows = mysql_fetch_array($query2)){ echo $rows['title']; echo $rows['id']; echo $rows['image_section']; echo $rows['subject']; echo $rows['image_post']; how can in take this ten results but use them with different places ,and keep them Arranged from one to ten . Thanks...

Member Avatar
Member Avatar
+0 forum 4

Hi, I have this datatable that I need to loop for my excel exporting function. And I have to export data that exceeds the row limit of excel worksheet. now I want to know how to create a query of limit on the datatable.select in such way like in sql. Example: (In mySql) Select * from table **limit 0,10;** Is there such query on the datatable.select that I can use? Like datatable.select("LIMIT 0,10") Thanks.

Member Avatar
Member Avatar
+0 forum 1

Hi, There is a bug with the editor that I noticed and others noticed too. When you post a very long code segment (or maybe just a long post, period), at some point it seems to overflow the capacity of the editor and you can no longer scroll all the way to the end of the post. The scroller becomes weird and jumps around, but you can never get to actually see the latter end of the post in the editor. You can still edit the content after where the editor stops, and that content still turns up in the …

Member Avatar
Member Avatar
+0 forum 7

Hi Friends, I am trying to limit the number of pages to display on my code. Can someone please help? I am trying to get something like http://stackoverflow.com/questions/8361808/limit-pagination-page-number $Num_Rows = mysql_num_rows($objQuery); $Per_Page = 15; // Per Page $Page = $_GET["Page"]; if(!$_GET["Page"]) { $Page=1; } $Prev_Page = $Page-1; $Next_Page = $Page+1; $Page_Start = (($Per_Page*$Page)-$Per_Page); if($Num_Rows<=$Per_Page) { $Num_Pages =1; } else if(($Num_Rows % $Per_Page)==0) { $Num_Pages =($Num_Rows/$Per_Page) ; } else { $Num_Pages =($Num_Rows/$Per_Page)+1; $Num_Pages = (int)$Num_Pages; } $strSQL .=" order by adid DESC LIMIT $Page_Start , $Per_Page "; $objQuery = mysql_query($strSQL); ?> <? while($objResult = mysql_fetch_array($objQuery)) { ?> <div style="margin-left:64px; margin-right:64px;" > …

Member Avatar
Member Avatar
+0 forum 1

Hi friends, I have a site, where I want to limit the number of pages being viewed. example: 1 | 2 | 3 | 4 | 5 | 5 | 7 | 8 | 9 | 10 | 11 want to reduce this to: 1 | 2 | 3 | 4 | ... | 10 | 11 I have the code but is giving headaches. if(!empty($_GET[Start])) { $Start = $_GET[Start]; } else { $Start = '0'; } // limit of links per page $ByPage = '13'; $rnav = mysql_query($qnav) or die(mysql_error()); $rows = mysql_num_rows($rnav); if($rows > $ByPage) { $ListingTable .= …

Member Avatar
Member Avatar
+0 forum 2

Hi All, How i can restrict the numbers of customer from database? I use adodb with access. I know how to retrieve customers from database but i don't know how to restrict it to spesific numbers. Best Regards. Sturdy

Member Avatar
Member Avatar
+0 forum 4

Hi, I have a database called my_db1 which contains 3 tables. Out of the 3 tables one table is being populated 24*7. My hosting provider (i.e godaddy) provides 25 Mysql databases 1 GB each. What should I do if the database exceeds the 1 GB size limit? Is there a way that my PHP script can detect the size of the database and automatically starts populating data to a different database with the same table structure? Thanks Anita

Member Avatar
Member Avatar
+0 forum 4

Hi, As being new to the forum website ..... i don't have much ex poser in the forum ..i have a doubt regarding the limit of per day post submission. Can anybody please let me know that how many post i can submit everyday here ?

Member Avatar
Member Avatar
+0 forum 26

Id like to limit the text chars shown in this script because too many chars are displayed causing overlap (see link) no idea what to do, please help? p.s I dont know js so if you could kindly be very specific, thanks. :) see it here (bottom of page 5 thumbnails with text below) [url]http://camosreptiles.com.au/forum/index.php?p=/[/url] [CODE]if(typeof(linkwithin_is_running)==='undefined'){linkwithin_is_running=true;LW={v:35,hs:[],ts:[],ps:[],ws:[],wsl:[],dh:0};LW.gsn=function(){var load=[0.12,0.06,0.36,0.10,0.36];var sum=function(n){var c=0;for(var i=0;i<n;c+=load[i++]);return c;} var r=Math.random();if(r<sum(1))return"";else if(r<sum(2))return"2";else if(r<sum(3))return"3";else if(r<sum(4))return"4";else return"5";} LW.m=function(f,a){var a2=[];for(var i=0,l=a.length;i!==l;++i){a2.push(f(a[i]));} return a2;};LW.f=function(f,a){var a2=[];for(var i=0,l=a.length;i!==l;++i){if(f(a[i]))a2.push(a[i]);} return a2;};LW.c=function(u){var e=document.createElement('script');e.type='text/javascript';e.src=u;document.getElementsByTagName('head')[0].appendChild(e);};LW.sb=function(){if(window.addEventListener){window.addEventListener("scroll",function(){LW.cl();},false);window.addEventListener("resize",function(){LW.cl();},false);} else if(window.attachEvent){window.attachEvent("onscroll",function(){LW.cl();});window.attachEvent("onresize",function(){LW.cl();})} else if(document.getElementById){var oldOnScroll=window.onscroll;var oldOnResize=window.onresize;window.onload=function(){oldOnScroll();LW.cl();} window.onresize=function(){oldOnResize();LW.cl();}}} LW.cl=function(){topY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;topY-=200;vpHeight=window.innerHeight||document.documentElement.clientHeight;bottomY=parseInt(vpHeight+topY+1000);var extra='';if(window['linkwithin_text_only']){extra="&textonly=1";} if(LW.hs.length>0&&LW.ws.length>0&&LW.wsl.length>0&&LW.ws[0].offsetWidth==0){LW.hs=[];LW.ps=[];LW.ws=[];LW.wsl=[];LW.lws3();return;} for(i=0;i<LW.ws.length;i++){if(LW.wsl[i]){continue;} var elemY=LW.getY(LW.ws[i]);if(bottomY>elemY&&elemY>topY){LW.dh=LW.gdh();LW.wsl[i]=1;LW.c(LW.u+'show_widget'+'?site_id='+linkwithin_site_id+'&url='+escape(window.location)+'&callback=LW.sw'+'&widget_id='+i+'&permalink='+escape(LW.ps[i]?LW.gl(LW.ps[i]):'')+'&version='+LW.v+extra);}}} LW.getY=function(e){var y=0;while(e!=null){y+=e.offsetTop;e=e.offsetParent;} return y;} LW.ah=function(i,e,d){var e2=document.createElement('div');e2.setAttribute("id","lws_"+i);e2.innerHTML=d;e.appendChild(e2);LW.ws[i]=e2;};LW.gesbtc=function(t,c,r){var p=new RegExp('(^|\\s)'+c+'(\\s|$)','i');return LW.f(function(e){return p.test(e.className)},(r||document).getElementsByTagName(t));};LW.fesbc=function(l,c){var …

Member Avatar
Member Avatar
+0 forum 1

Hi, I am new here and want to know that how many post i can submit here on per/day basic ? Is there any limit for new user on the post submission ?

Member Avatar
Member Avatar
+0 forum 6

I want to limit uploading size of the user image. How can i do this? User should upload only jpg file and it would be less than 100kb. and is there any way i can convert that image into specific resolution? Thanks....

Member Avatar
Member Avatar
+0 forum 7

Well I am coding a small intermediate program to help me with learning c++ , and i am wondering how to check for blank input to cin >> string heres what i have [CODE]string name; cout << "Enter You're Name: "; getline(cin, name); [/CODE] and if i just hit enter without typing any name the program just stays blank it is a console app btw

Member Avatar
Member Avatar
+0 forum 3

Hi all. Not sure if this is the right forum, but it seemed the most appropriate from the list. I'm helping to develop a ghost-themed site. As it deals with an urban legend, we're pretty sure that kids will come across it, but don't want them to visit. There's really nothing dodgy going on here, just that we think that some of the content would be unsuitable for kids below 12 years old. If possible, we'd like security software like Net Nanny etc to block the site. Is there a submission site for such things? I realise that we could …

Member Avatar
Member Avatar
+0 forum 4

The End.