[PHP-DB] Updating SQLite on php 5
Greetings all. I am running PHP 5 on FreeBSD and would like to replace the embeded SQLite (2.8...) by an upgraded version (3.12). I have no clue of how this can be done. On windows one apparently only need to replace the dll (or am I wrong ?). How can that be done on FreeBSD ? Thanks for any tip. Paco -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Upgrading SQLite exec in PHP 5
Greetings all. I am running PHP 5 on FreeBSD and would like to replace the embeded SQLite (2.8...) by an upgraded version (3.12). I have no clue of how this can be done. On windows one apparently only need to replace the dll (or am I wrong ?). How can that be done on FreeBSD ? Thanks for any tip. -- franp mailto:[EMAIL PROTECTED]
[PHP-DB] Forms...
Does anyone know if it is possible to have 'checkbox' elements in a form appear 'checked' or 'unchecked' when a page loads data from a MySQL data source? Can I use an attribute in the input tag to switch that? -- Mark Benson AIM - SilValleyPirate MSN - [EMAIL PROTECTED] Visit FlatPackMacs online: http://fpm.68kmac.com Visit my Homepage: http://homepage.mac.com/markbenson Introducing Macintosh Classic II - pick one out on your way past the trash! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Forms...
I use this format input name=right_eye type=checkbox value=1 ? if ($rows['right_eye']==1) { echo CHECKED ; } ?nbsp;Right Eye(s) Bastien From: Mark Benson [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Forms... Date: Wed, 9 Mar 2005 19:12:31 + Does anyone know if it is possible to have 'checkbox' elements in a form appear 'checked' or 'unchecked' when a page loads data from a MySQL data source? Can I use an attribute in the input tag to switch that? -- Mark Benson AIM - SilValleyPirate MSN - [EMAIL PROTECTED] Visit FlatPackMacs online: http://fpm.68kmac.com Visit my Homepage: http://homepage.mac.com/markbenson Introducing Macintosh Classic II - pick one out on your way past the trash! -- 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] Forms...
Bastien Koert wrote: I use this format input name=right_eye type=checkbox value=1 ? if ($rows['right_eye']==1) { echo CHECKED ; } ?nbsp;Right Eye(s) if your into XHTML: input name=right_eye type=checkbox value=1 checked=checked value=1 / (Bastien already showed how to dynamically determine whether the chkbox is checked :-) ... all attribs in lower case, and every one must have a value set, in the case of the 'checked' attrib the value is 'checked'. I haven't tried it out but I assume the following html would result in an unchecked box - I also imagine that that may depend on the DOCTYPE of the output page - and I may just be plain wrong :). input name=right_eye type=checkbox value=1 checked= value=1 / Bastien From: Mark Benson [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Forms... Date: Wed, 9 Mar 2005 19:12:31 + Does anyone know if it is possible to have 'checkbox' elements in a form appear 'checked' or 'unchecked' when a page loads data from a MySQL data source? Can I use an attribute in the input tag to switch that? -- Mark Benson AIM - SilValleyPirate MSN - [EMAIL PROTECTED] Visit FlatPackMacs online: http://fpm.68kmac.com Visit my Homepage: http://homepage.mac.com/markbenson Introducing Macintosh Classic II - pick one out on your way past the trash! -- 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] big data base
Hi All, I need you help. I need to design a very big data base, around 900GB or more of information but I never had design or manage this magnitude of information before. I really appreciate if you can point me to documentation to how can do this properly or you can help me with some experiance you have doing this. Thanks, Luis -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] big data base
www.highperformancemysql.com if mysql what is the db? and application load? You may want to be looking at Oracle / DB2 Bastien From: luis medrano [EMAIL PROTECTED] Reply-To: luis medrano [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] big data base Date: Wed, 9 Mar 2005 11:54:08 -0800 Hi All, I need you help. I need to design a very big data base, around 900GB or more of information but I never had design or manage this magnitude of information before. I really appreciate if you can point me to documentation to how can do this properly or you can help me with some experiance you have doing this. Thanks, Luis -- 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] big data base
Sorry, just to further my other message. At this size, the iron it runs on is as important as the size of the db. You are likely gonna need some big machines and NAS / SAN to manage the storage. http://www.dmreview.com/article_sub.cfm?articleId=447 http://www.oracle.com/technology/tech/java/architect/mwa_week8.html http://www.oracle.com/technology/industries/life_sciences/presentations/olsug_june04/olsug_june04_wellcome_sanger_trust.pdf bastien From: luis medrano [EMAIL PROTECTED] Reply-To: luis medrano [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] big data base Date: Wed, 9 Mar 2005 11:54:08 -0800 Hi All, I need you help. I need to design a very big data base, around 900GB or more of information but I never had design or manage this magnitude of information before. I really appreciate if you can point me to documentation to how can do this properly or you can help me with some experiance you have doing this. Thanks, Luis -- 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] big data base
On Wed, 2005-03-09 at 11:54 -0800, luis medrano wrote: Hi All, I need you help. I need to design a very big data base, around 900GB or more of information but I never had design or manage this magnitude of information before. I really appreciate if you can point me to documentation to how can do this properly or you can help me with some experiance you have doing this. Thanks, Luis Your best bet for an opensource db, is to use PostgreSQL. There are companies that are using PostgreSQL for DBs over a terabyte in size. -Robby -- /*** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | [EMAIL PROTECTED] * 503.351.4730 | blog.planetargon.com * PHP-PostgreSQL Hosting Development * open source solutions - web hosting / -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] big data base
luis medrano wrote: Hi All, I need you help. I need to design a very big data base, around 900GB or more of information but I never had design or manage this magnitude of information before. I really appreciate if you can point me to documentation to how can do this properly or you can help me with some experiance you have doing this. I wasn't going to chime in, but after reading some replies I feel I have to. Bottom line - you need to give more details. The design of the database will not depend greatly on the amount of data inside it, unless there are operations/calculations to be done on/with it. Most people talk number of rows / tables / read|write operations / joins / etc. when talking database design, instead of size - as with proper indexes, the size can affect things very little. For example - if you're designing a database to store 20GB raw movie files - then you might want to rethink storing the gigs of data inside the database, then suddenly you aren't working with a large database at all. So, if you can't give more details - you're going to have to search on your own. Otherwise, you might want to speak up with some more info so you can get better recommendations. My only suggestion with the information you've given - is basically what Bastien said - multiple big iron and big fast hard disks / SAN. Other than that, I can only suggest that you design it well :) P.S. - I wanted to toss in a troll reply about trying SQLLite, since it comes with PHP! - but that's mean P.P.S. - I was also tempted to link to a great tutorial on this - an arbitrary resume writing tutorial, as a mean spiteful joke about being in over your head - but that's just too mean. It all depends on the system requirements, your budget, and your time. cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Merge result set of query?
My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case? John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Merge result set of query?
ioannes wrote: My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case? You're going to have to merge the results within PHP. not a valid resource is an error you get when you try to read from a result set and what you pass it isn't a resource for a result set. I think you're doing something along the lines of: $result1 = query_database_one($somequery); $result2 = query_database_two($someotherquery); $result = array_merge($result1, $result2); while (mysql_fetch_row($result)) { // foo } ... Which won't work on any level. mysql_fetch_row takes a resource, it's a pointer to give the database to retrieve the row. When you do your query to the database, the database does the query but doesn't return the full result - instead it just returns a resource to the result, so you can get it as you need it. I suggest you start from that information and work forward. cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Merge result set of query?
Martin Norland wrote: ioannes wrote: My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case? You're going to have to merge the results within PHP. not a valid resource is an error you get when you try to read from a result set and what you pass it isn't a resource for a result set. I think you're doing something along the lines of: $result1 = query_database_one($somequery); $result2 = query_database_two($someotherquery); $result = array_merge($result1, $result2); while (mysql_fetch_row($result)) { while reading I thought, would this: while (($row = mysql_fetch_row($result)) || ($row = mysql_fetch_row($result2))) { // just do it. } .. work (due to shortcircuiting)? and how ugly is it? // foo } ... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Merge result set of query?
Jochem Maas wrote: Martin Norland wrote: ioannes wrote: My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case? You're going to have to merge the results within PHP. not a valid resource is an error you get when you try to read from a result set and what you pass it isn't a resource for a result set. I think you're doing something along the lines of: $result1 = query_database_one($somequery); $result2 = query_database_two($someotherquery); $result = array_merge($result1, $result2); while (mysql_fetch_row($result)) { while reading I thought, would this: while (($row = mysql_fetch_row($result)) || ($row = mysql_fetch_row($result2))) { // just do it. } .. work (due to shortcircuiting)? and how ugly is it? // foo } That would work if you just wanted to iterate over both resultsets and do the same thing, yes. Say, if you had lists of users who signed up for something in two separate databases, you could print them all out with that. Since he said union and not join - that is probably his intention. I can't decide if that code is beautiful or horribly ugly though... I would have to say it's beautiful so long as the 'just do it' is very short - if the 'just do it' should be a function - then you should just suck it up and do two while's. Also, for every result in $result2, you have to poke at the first database and say any more yet?, which is hackish. slick 'obfuscated perl' entry type fix though :) [okay, it's not obfuscated in the traditional sense] cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Insertion problem
I'm sure that I typed the insertion query corrctly, but it still not committed. I mean that there is no record actually inserted. Is there any possible error, such as configuration error. I am using PHP 5 and MySQL Database Version 4.0.20. Sultan. - Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web
Re: [PHP-DB] Insertion problem
Did I miss the actual insert statement? Can you please show me your insert statement? ?php /* Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com [EMAIL PROTECTED] 562.924.4454 (office) 562.924.4075 (fax) continuing the struggle against bad code */ ? From: sultan Ibraheem [EMAIL PROTECTED] Date: Wed, 9 Mar 2005 14:30:35 -0800 (PST) To: php-db@lists.php.net Subject: [PHP-DB] Insertion problem I'm sure that I typed the insertion query corrctly, but it still not committed. I mean that there is no record actually inserted. Is there any possible error, such as configuration error. I am using PHP 5 and MySQL Database Version 4.0.20. Sultan. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] insertion problem (2)
Thanks for your time,, This is the code: $uu=mysql_query(insert into voters2 ('id','username','constnum','name','fname','gname','lname')values('$T10','$T1','$T11','$T4,'$T5','$T6','$T7')); $uu2=mysql_query(insert into voters2 ('sex','birth_day','email','password') values('$D1','$T9','$T8','$T2')); - Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web
Re: [PHP-DB] insertion problem (2)
Do you receive any errors or anything that might indicate a problem other then the date not appearing the db ? Be wordy -- hold nothing back -- give me as much as you can. ?php /* Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com [EMAIL PROTECTED] 562.924.4454 (office) 562.924.4075 (fax) continuing the struggle against bad code */ ? From: sultan Ibraheem [EMAIL PROTECTED] Date: Wed, 9 Mar 2005 14:50:57 -0800 (PST) To: [EMAIL PROTECTED], php-db@lists.php.net Subject: [PHP-DB] insertion problem (2) Thanks for your time,, This is the code: $uu=mysql_query(insert into voters2 ('id','username','constnum','name','fname','gname','lname')values('$T10','$T1' ,'$T11','$T4,'$T5','$T6','$T7')); $uu2=mysql_query(insert into voters2 ('sex','birth_day','email','password') values('$D1','$T9','$T8','$T2')); - Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] insertion problem (2)
This may not necessarily be the problem. But I am not sure that you should be capitalizing the first character of your variable. That is a special type of PHP variable - which I do not use normally - so I can not remember what it is called. However, put all your variables to lower case except the pre-defined variables such as $_POST and $_GET etc. See if that helps ?php /* Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com [EMAIL PROTECTED] 562.924.4454 (office) 562.924.4075 (fax) continuing the struggle against bad code */ ? From: sultan Ibraheem [EMAIL PROTECTED] Date: Wed, 9 Mar 2005 14:50:57 -0800 (PST) To: [EMAIL PROTECTED], php-db@lists.php.net Subject: [PHP-DB] insertion problem (2) Thanks for your time,, This is the code: $uu=mysql_query(insert into voters2 ('id','username','constnum','name','fname','gname','lname')values('$T10','$T1' ,'$T11','$T4,'$T5','$T6','$T7')); $uu2=mysql_query(insert into voters2 ('sex','birth_day','email','password') values('$D1','$T9','$T8','$T2')); - Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: insertion problem (2)
$uu=mysql_query(insert into voters2 ('id','username','constnum','name','fname','gname','lname')values('$T10','$T 1','$T11','$T4,'$T5','$T6','$T7')); $sql = insert into voters2 (id,username,constnum,name,fname,gname,lname)values('$T10','$T1','$T11','$T4 ,'$T5','$T6','$T7'); $uu=mysql_query($sql); $uu2=mysql_query(insert into voters2 ('sex','birth_day','email','password') values('$D1','$T9','$T8','$T2')); $sql = insert into voters2 (sex,birth_day,email,password) values('$D1','$T9','$T8','$T2'); $uu2=mysql_query($sql); Try this. Hope it gonna work. And for the next time, when you ask a question, please include all of the details which are relevant to your question. Good things to mention in your post include: a.. URL's b.. Keywords c.. A good description of the problem d.. Troubleshooting steps you have already taken Also, please give your question a relevant subject. robots.txt syntax question is a good subject. Please help is not a good subject. Regards, Nadim Attari -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] insertion problem (2)
Stephen Johnson wrote: This may not necessarily be the problem. But I am not sure that you should be capitalizing the first character of your variable. That is a special type of PHP variable - which I do not use normally - so I can not remember what it is called. However, put all your variables to lower case except the pre-defined variables such as $_POST and $_GET etc. See if that helps good on ya for trying to extract the question/problem from this guy Stephen! I just wanted to add that variable names can be in any case, may not start with a number (may contain alpha-numeric chars) and are case-sensitive. the following are all valid (and different): $Tee1 = 1; $tee1 = 1; $_tee1 = 1; $_TEE1 = 1; $Tee= 1; ?php /* Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com [EMAIL PROTECTED] 562.924.4454 (office) 562.924.4075 (fax) continuing the struggle against bad code */ ? From: sultan Ibraheem [EMAIL PROTECTED] Date: Wed, 9 Mar 2005 14:50:57 -0800 (PST) To: [EMAIL PROTECTED], php-db@lists.php.net Subject: [PHP-DB] insertion problem (2) Thanks for your time,, This is the code: $uu=mysql_query(insert into voters2 ('id','username','constnum','name','fname','gname','lname')values('$T10','$T1' ,'$T11','$T4,'$T5','$T6','$T7')); $uu2=mysql_query(insert into voters2 ('sex','birth_day','email','password') values('$D1','$T9','$T8','$T2')); - Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Merge result set of query?
Martin Norland wrote: Jochem Maas wrote: Martin Norland wrote: while (($row = mysql_fetch_row($result)) || ($row = mysql_fetch_row($result2))) { // just do it. } .. work (due to shortcircuiting)? and how ugly is it? // foo } That would work if you just wanted to iterate over both resultsets and do the same thing, yes. Say, if you had lists of users who signed up for something in two separate databases, you could print them all out with that. Since he said union and not join - that is probably his intention. that was what I had in mind when it popped into my head :-) I can't decide if that code is beautiful or horribly ugly though... I would have to say it's beautiful so long as the 'just do it' is very short - if the 'just do it' should be a function - then you should just suck it up and do two while's. Also, for every result in $result2, you have to poke at the first database and say any more yet?, which is hackish. slick 'obfuscated perl' entry type fix though :) [okay, it's not obfuscated in the traditional sense] ok, I apprieciate your comments - its always good to get a experienced 'hackers' view on things. thank you Martin! cheers, -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php