[PHP-DB] DB formatting question
Hi there everyone, I’m converting a video website from CGI to use Databases and they want me to keep their existing layout. However, I have a slight formatting problem. I’m using PHP with MySQL and what I have is this: Each page displays 6 videos, 2 are on the first row (Which has 3 columns with the 2nd one being a hardcoded flash video) so the first 2 videos go on the left and on the right, then below that is another row with 4 columns which have to display the other 4 videos. How can I format the table so that when the MySQL data is read in the loop, it displays the data like this? I can display it down the page no problem, but it needs to be 3 columns across on 1 row with the middle column not having any MySQL data and the 2nd row needs to have 4 videos, 1 in each of the 4 columns. Does that make sense? Chris -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.16/83 - Release Date: 8/26/2005
Re: [PHP-DB] Re: maximum number of records in a db?
Jordan > I am sorry that people like to ridicule noobs on this list. It was a > simple question with a simple answer. Thank you!! Not at all, shame if you see it this way - it is mostly a case of people on this list helping you to help yourself - respect to those who've had a go at finding the info themselves first. I've hardly ever asked a question here, because I have found the answer elsewhere first - treat this list as more of a last resort... raz -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: maximum number of records in a db?
And I agree. I haven't asked many questions myself but have seen the responses from some people. I think you have to think that they have looked and this IS their last resort. I've found when doing searches on the web that I get presented with 5000 pages of un relevant stuff. Remember when you couldn't use a mouse??? Han. - Original Message - From: "Darryl Steyn" <[EMAIL PROTECTED]> To: Sent: Friday, August 26, 2005 5:07 PM Subject: Re: [PHP-DB] Re: maximum number of records in a db? with questions being answered like that, i am sure many will. On 8/26/05, Raz <[EMAIL PROTECTED]> wrote: Jordan > I am sorry that people like to ridicule noobs on this list. It was a > simple question with a simple answer. Thank you!! Not at all, shame if you see it this way - it is mostly a case of people on this list helping you to help yourself - respect to those who've had a go at finding the info themselves first. I've hardly ever asked a question here, because I have found the answer elsewhere first - treat this list as more of a last resort... raz -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: maximum number of records in a db?
with questions being answered like that, i am sure many will. On 8/26/05, Raz <[EMAIL PROTECTED]> wrote: > > Jordan > > > I am sorry that people like to ridicule noobs on this list. It was a > > simple question with a simple answer. Thank you!! > > Not at all, shame if you see it this way - it is mostly a case of > people on this list helping you to help yourself - respect to those > who've had a go at finding the info themselves first. I've hardly ever > asked a question here, because I have found the answer elsewhere first > - treat this list as more of a last resort... > > raz > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
RE: [PHP-DB] maximum number of records in a db?
It kinda depends on the load placed on the db. Large chunks of data in the db (like images or other files like video, pdf etc) can slow the system down. There are many databases running with over 50Million rows of data in a table. But at a certain level, its as much hardware and network dependant as its language and db dependant. bastien From: Jordan Miller <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] maximum number of records in a db? Date: Fri, 26 Aug 2005 10:11:13 -0500 I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well with php. any ideas? thanks, Jordan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: maximum number of records in a db?
Dan, Wow, thank you very much for an actual answer. It is much appreciated. I am sorry that people like to ridicule noobs on this list. It was a simple question with a simple answer. Thank you!! Jordan On Aug 26, 2005, at 10:45 AM, Dan Baker wrote: "Jordan Miller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well with php. any ideas? Using MySQL with PHP: I believe that a MyISAM table has a maximum row count of 2^32 (4,294,967,296) rows. I believe that an InnoDB table *may* not have this limit. PostgreSQL: There is no limit on the # of rows in a table, see: http://www.postgresql.org/docs/faqs.FAQ.html#4.4 Remember that there are other limits (like diskspace, and the time it takes to perform a query on the data, indexing the data ...) If you are concerning about the row limit, you may need to re-think the problem. DanB -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] maximum number of records in a db?
like i said, billions are possible, but it becomes more of hardware issue, disk space, network availability etc bastien From: Jordan Miller <[EMAIL PROTECTED]> To: Miles Thompson <[EMAIL PROTECTED]> CC: php-db@lists.php.net Subject: Re: [PHP-DB] maximum number of records in a db? Date: Fri, 26 Aug 2005 10:40:17 -0500 i am talking about individual records, not putting all records into a very long string, if that's what you are saying. i know people routinely use millions of records... but how about billions or more? Jordan On Aug 26, 2005, at 10:29 AM, Miles Thompson wrote: At 12:11 PM 8/26/2005, Jordan Miller wrote: I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well with php. any ideas? thanks, Jordan This is a useless question. Here's the matching answer: The number of records any database can hold matches the length of a piece of string. Seriously - do some homework, visit the host sites and read the specs. A lot depends on what you intend to store. As for "interacting well" - push the string. MT -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] maximum number of records in a db?
he said number of records MT not number of charactors. So no need to stick his head on a pike just yet ;) But to answer your question jordan... the idea is that you probably wont run out of rows. 32 bits allow integers to go to some number like 2,147,483,647, and i spose that would be the max. 64 bit processors up that max integer number... Hope that helps. - Original Message - From: "Miles Thompson" <[EMAIL PROTECTED]> To: Sent: Friday, August 26, 2005 8:29 AM Subject: Re: [PHP-DB] maximum number of records in a db? > At 12:11 PM 8/26/2005, Jordan Miller wrote: > >I was just wondering what is the maximum number of records that can > >be successfully handled with a db. any db will do. it doesn't have to > >be the fastest or best, just one that can hold the maximum number of > >records and still be able to interact well with php. any ideas? > > > >thanks, > >Jordan > > > This is a useless question. Here's the matching answer: The number of > records any database can hold matches the length of a piece of string. > > Seriously - do some homework, visit the host sites and read the specs. A > lot depends on what you intend to store. > > As for "interacting well" - push the string. > > MT > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: maximum number of records in a db?
"Jordan Miller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I was just wondering what is the maximum number of records that can be >successfully handled with a db. any db will do. it doesn't have to be the >fastest or best, just one that can hold the maximum number of records and >still be able to interact well with php. any ideas? Using MySQL with PHP: I believe that a MyISAM table has a maximum row count of 2^32 (4,294,967,296) rows. I believe that an InnoDB table *may* not have this limit. PostgreSQL: There is no limit on the # of rows in a table, see: http://www.postgresql.org/docs/faqs.FAQ.html#4.4 Remember that there are other limits (like diskspace, and the time it takes to perform a query on the data, indexing the data ...) If you are concerning about the row limit, you may need to re-think the problem. DanB -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] maximum number of records in a db?
Perhaps you misunderstood what Miles wrote...never mind eh? Go here for example: http://www.mysql.com/why-mysql/ - found that in about 6 secs... raz -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] maximum number of records in a db?
i am talking about individual records, not putting all records into a very long string, if that's what you are saying. i know people routinely use millions of records... but how about billions or more? Jordan On Aug 26, 2005, at 10:29 AM, Miles Thompson wrote: At 12:11 PM 8/26/2005, Jordan Miller wrote: I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well with php. any ideas? thanks, Jordan This is a useless question. Here's the matching answer: The number of records any database can hold matches the length of a piece of string. Seriously - do some homework, visit the host sites and read the specs. A lot depends on what you intend to store. As for "interacting well" - push the string. MT -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] maximum number of records in a db?
At 12:11 PM 8/26/2005, Jordan Miller wrote: I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well with php. any ideas? thanks, Jordan This is a useless question. Here's the matching answer: The number of records any database can hold matches the length of a piece of string. Seriously - do some homework, visit the host sites and read the specs. A lot depends on what you intend to store. As for "interacting well" - push the string. MT -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] maximum number of records in a db?
I was just wondering what is the maximum number of records that can be successfully handled with a db. any db will do. it doesn't have to be the fastest or best, just one that can hold the maximum number of records and still be able to interact well with php. any ideas? thanks, Jordan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] session confusion| can anyone help?
try defining the values as empty strings first... bastien From: "bo" <[EMAIL PROTECTED]> Reply-To: "bo" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] session confusion| can anyone help? Date: Fri, 26 Aug 2005 11:42:18 +0800 here is the code for accesscontrol.php which control the access to protected page, the server gives an error as of Notice: Undefined index: uid in E:\www\signup\accesscontrol.php on line 7 Notice: Undefined index: pwd in E:\www\signup\accesscontrol.php on line 8 I tried input username and password and it will give the error as: Access Denied Your user ID or password is incorrect, or you are not a registered user on this site. To try logging in again, click here. To register for instant access, click here. code // $suid = isset($_POST['suid']) ? $_POST['suid'] : $_SESSION['suid']; //line 7 $spwd = isset($_POST['spwd']) ? $_POST['spwd'] : $_SESSION['spwd']; //line 8 if(!isset($suid)) { ?> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> Please Log In for Access Login Required You must log in to access this area of the site. If you are not a registered user, click here to sign up for instant access! User ID: Password: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> Access Denied Access Denied Your user ID or password is incorrect, or you are not a registered user on this site. To try logging in again, click here. To register for instant access, click here. // Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Get away from eval()
Greetings, all. Thanks to those who fielded my sql injection question yesterday. Enormously helpful. On to eval(). I've got a PHP 4.3.xx and a MySQL 4.xx (sometimes 3.2xx) database that is the basis of a CMS. The story field of the content table sometimes holds PHP code that needs to be executed when it's called. Mostly simple forms, some includes, and the like. For the life of me, I cannot figure out how to execute that code without using an eval() statement, and I'd like to avoid using eval() for security and overhead reasons. A sample looks like this: $query="SELECT * FROM $database.$stories where id='$sid';"; $result=mysql_query($query); $numberofresults=mysql_num_rows($result); for ($i=0; $i<$numberofresults; $i++) { $row=mysql_fetch_array ($result); $body=($row['storycontent']); echo ("".ucwords($hl)."");} eval($body=$body); This works, and the scripts execute. But there's always room for improvement. I've read about using output buffers, but can't understand quite how that works. Any suggestions would be appreciated. -V -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php