Jump to content

birbal

Members
  • Posts

    2,543
  • Joined

  • Last visited

Everything posted by birbal

  1. it is sql query which pull your data from database. it should be passed in any query executing function of your database engine or api you are using (eg mysql_query() or mysqli_query()) the above query is just a mock query it should be writen as you need. CALC_FOUND_ROWS is what will let return the found_rows() the total number of rows.
  2. http://w3schools.invisionzone.com/index.php?showtopic=44054&view=getnewpost this is similar to your problem
  3. you need to do like this SELECT CALC_FOUND_ROWS *.......LIMIT 0,10 immidiately after executing this you have to execute FOUND_ROWS() which will give the total found rows which you can use to determine the number of pages.
  4. cakephp official docs and tutorials are pretty good and brief. have you tried look into that?
  5. There is many free stock photography sites. some of it needs permission,some of are for personal use etc. if you google 'free stock photography site' you will get many. Be cautious about license. http://sixrevisions.com/resources/15-best-places-for-designers-to-get-free-stock-photos-online/
  6. Updated to PHP 5.4.4 on Apache 2.4.2

  7. You can do it with any server side language without using JS, which probably is easier. you need to get the directory where images are. you will get images in array and can use random functions to get a image from them and then you hav eto just insert the img tag with src pointed to that image location.
  8. what error are you refering? require_once() does not thro error if you accidently include same file it will just not include it second time and ignore it. though it throw error when file path does not match
  9. yes something like that. http://owsap.org either a form based authentication where you need to login everytime and which has privilages checking. but you have to login every time when your session dies. either way and which seems suitable for you would be setting a hashed string for each row which will be passed with url and you will check the string if it matches with the stored hash of database. if it matches do the job mark them verified and you can also set the hash fields to NULL to save disk space
  10. if your date time is stored as timestamp you have to create a timestamp range and check against database which entries comes between this. if it is date time object in DB you can use several date functions in php to find the matches.
  11. as you are pulling everything from the database so it might be relevant to think that echoing the whole page inside php block is the way and it is if you pulling just a everything from it. but there is better way of doing this. people usualy dont store page markups in their database. they store its contents. those contents are being inject into html markup. that is where template engine comes. you may heared of MVC which is based on same theory, seprating the markup from the php code. You definitly seeing the problem from one point of view but if you consider other scenerio you will find it is always easier to maintain separated markup and codes. Efficiency is an issue and also the maintainability. i felt the importance of the second one more. writing markup with php may not hurt but in practical larger implementetion it is not suitable.
  12. I will take look into this. thank you for the help so far.
  13. I dont have VC10 or windows sDK 7.1 either and i think it is for windows 7.I have XP SP3 and i doubt my computer will be able to fullfil their minimum system requirements. I had downloaded apache 2.4 binary and installed and configured it. server is running without the php module. Do you know where to find the source if i want to compile manually? official site does not seem like have 2.4 source for windows.
  14. first insert the data which will be posted by user. get the last insert id of the insertion. make a url where you will embded the ID of the data in query string. the query string will point to a script where you will alter the FLAG field. flag field is boolean field which will determine it is accepted or not. You also have to make sure of some authentication otherwise anyone would pass the query string with arbitaray id and can alter the FLAG. If you want you can also send the data as content with the URL in email body.
  15. yes you can do like that. define() not only can take value as integer it can be any scalar types or even expressions. the constant will be available in your global scope of your script.
  16. i am not sure what is your question actualy. did you check this? http://php.net/define
  17. have you come up with any code so far? did you set up your database?
  18. birbal

    type casting

    yes. it is auto type casted but not necessarily to strings. it could be other types also http://php.net/languages.type <= if you check every types here you can see how one data type is converted to another.
  19. when it is about dynamic pages search engine ignores the query part of URI. you have to rewrite the url using .htaccess so it removes the query part and structure like directory like. the rest of the things happens same like static page. bots does not care how does the page generated it will look for the data which is relevant for them and will use them.
  20. there is some software which can download from stream and probably some browser addons also exist.. if you have real one player it can do the job too.
  21. you can check the error log of the server to see why does it failing
  22. it looks like its compiled with vc10. would not be a problem with that?
  23. i am installing php 5.4. i was using 5.3 before with apache 2.0 do i need to compile apache from the source too? as i am using vc9 compiler to compile php and my previous apache was compiled in vc6 probably (xampp installation). so it would not be matched. if its need to compile from source i will like to upgrade to apache 2.4 but i cant see any source for windows in there official site. am i missing something? or i am limited to compile it from version 2.2?
  24. you can try downloading xampp or wampp package which will download and install in one place. which may be easier for you. it includes apache as web server so in the case you have to disable iis to continue with it.
  25. It is working now. thanks for the help.
×
×
  • Create New...