[PHP-DB] Firebird under Windows 2000
Hi!: I don't know if anybody tried PHP with Firebird, but I've got a really curious problem. I've installed PHP 4.3.3 and work with Firebird 1.5 RC6 and MS - IIS without any problems, but suddenly, and with no other advice or error messages than the "ring" of a bell my PHP pages stop to work. I tried everything but nothing seems to solve the problem. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Sybase
Hi all, As many, I'm forced to start my message too with the problem statement that I can't connect to my sybase database. I have to be more honest even in saying that I don't even know the difference in --enable-sybase and --enable-sybase-ct (I have tried both). I'm by no means an SQL nitwit.. I just never had to work with sybase before. I don't have any clue when it comes to sybase.. never worked with any, but I have to now. I have a login and can connect using isql and the database definition 'CST_SYB' which comes straight out of the sybase interfaces file. However I can't seem to get any php connections working. I can flood you with sybase_connect() examples, but they come straight from the manual. What am I missing ? Oh btw, I compiled my php using the orignal sybase openclient package in $SYBASE, but I also see people referring to 'freedts'? I assume this is a substitute in case no original sybase libs are available, right? Anyway, any pointers would be more then welcome. /Stephan -- Stephan van Beerschoten [SVB21-RIPE] [EMAIL PROTECTED] PGP fingerprint: 4557 9761 B212 FB4C 778D 3529 C42A 2D27 "To err is human, to forgive is Not Company Policy" -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] large csv text file import into postgresql via PHP
El Jue 25 Sep 2003 13:08, Dave [Hawk-Systems] escribió: > we have a number of csv dumps that occasionally have to be used to update > tables in a postgres database... > > normally this is done by uploading the file and whomever running a php > based parser which opens the file into an array, does a split on the comma, > then executes an insert or update to the database with the split array > values. > > we have a new upload that involves a 143mb file, compared to previous > upload sizes of 10k to 150k. Is there a more efficient way to handle this > rather than having PHP load the entire file into an array (which would have > to be in memory during the operation, correct?). I guess you are using file() to read the entire file. Try using fopen() and read line by line with fread(). -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? - Martín Marqués |[EMAIL PROTECTED] Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: MySQL Very Slow Work.
You can always try indexing your data, this will improve your query speeds. Don't know how you are quering data, but would suggest using keys and "optimized" query expressions. You should also check your Win 2000 services running and anything that might interfere with your setup (ie: antivir, etc), just a thought! it might not have anything to do with your problem though. No concerning the list, but its interesting if you are Russian how you build your sentences in English... just like orientals do, so the root of the languages must be the same (russian and oriental dialects). Christian. "äÒÕÞÉË ëÉÒÉÌÌ" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have php 4.3.2, Apache 2.0.46 and MySQL 4.* on Windows 2000 SP4. > And i have problem. > When i make query from php to MySQL. > This work wery slow. > Every query 4-5 sec. > What i can make. > Sorry for error, i know english wery bad. > Please HELP ME! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL Very Slow Work.
On Sat, 20 Sep 2003 19:54:18 +0400 "äÒÕÞÉË ëÉÒÉÌÌ" <[EMAIL PROTECTED]> wrote: > I have php 4.3.2, Apache 2.0.46 and MySQL 4.* on Windows 2000 SP4. > And i have problem. > When i make query from php to MySQL. > This work wery slow. > Every query 4-5 sec. > What i can make. > Sorry for error, i know english wery bad. > Please HELP ME! > Don't worry about your grammar errors. I'm sure my russian would be worse. I am assuming you that are russian based on you email address..but that is off topic for the list. Firstly, You never said what processor and the amount of memory that is in the machine that you have install that software. How many records have you got in the database?? We have implemented a project in which queries take 20-30 seconds.. about 1 million records, I think.. George Patterson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MySQL Very Slow Work.
I have php 4.3.2, Apache 2.0.46 and MySQL 4.* on Windows 2000 SP4. And i have problem. When i make query from php to MySQL. This work wery slow. Every query 4-5 sec. What i can make. Sorry for error, i know english wery bad. Please HELP ME! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] large csv text file import into postgresql via PHP
we have a number of csv dumps that occasionally have to be used to update tables in a postgres database... normally this is done by uploading the file and whomever running a php based parser which opens the file into an array, does a split on the comma, then executes an insert or update to the database with the split array values. we have a new upload that involves a 143mb file, compared to previous upload sizes of 10k to 150k. Is there a more efficient way to handle this rather than having PHP load the entire file into an array (which would have to be in memory during the operation, correct?). thanks Dave -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] parse error.
Hi Micella You need to either slash-escape your insert query or use single quotes: $query="insert into dene (day,start_time) values (\"2003.09.25\",\"22:30\") " ; or $query="insert into dene (day,start_time) values ('2003.09.25','22:30') " ; steve M|cella Erdem Efe wrote: I am a new programmer of PHP4.3.3 an MySql 3.23 . When below script is executed "Parse error: parse error, unexpected T_DNUMBER in c:\program files\apache group\apache\htdocs\ilkdeneme21.php on line 17" is being seen. This may be very simple but I could not solve it.Could you help me for this error? Thanks for your attention [EMAIL PROTECTED] mysql_connect("localhost","username"); if (mysql_select_db($dbname)) { echo "connected";} else { echo "not connected";} $query="insert into dene (day,start_time) values ("2003.09.25","22:30") " ; $result=mysql_query($query); if ($result)) { echo "data girildi";} else { echo "data girilemedi"; exit;} ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] OUTFILE
select into OUTFILE from Enjoy happy programming Nitin - Original Message - From: "Jonatan Pugliese." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 25, 2003 6:59 PM Subject: [PHP-DB] OUTFILE > How to use OUTFILE function in mysql and linux? > > > > Jonatan Pugliese > Area Sistemas > ACA - Automovil club Argentino > 4808-4676 / 4663 > www.aca.org.ar > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
[PHP-DB] OUTFILE
How to use OUTFILE function in mysql and linux? Jonatan Pugliese Area Sistemas ACA - Automovil club Argentino 4808-4676 / 4663 www.aca.org.ar -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
SV: [PHP-DB] parse error.
Hi, There are at least two errors in your script: $query="insert into dene (day,start_time) values ("2003.09.25","22:30") " ; should be $query="insert into dene (day,start_time) values ('2003.09.25','22:30') " ; And if ($result)) should be if ($result) regards Henrik Hornemann > -Oprindelig meddelelse- > Fra: Mücella Erdem Efe [mailto:[EMAIL PROTECTED] > Sendt: 26. september 2003 00:52 > Til: [EMAIL PROTECTED] > Emne: [PHP-DB] parse error. > > > I am a new programmer of PHP4.3.3 an MySql 3.23 . > > When below script is executed > "Parse error: parse error, unexpected T_DNUMBER in c:\program > files\apache group\apache\htdocs\ilkdeneme21.php on line 17" > is being seen. > > This may be very simple but I could not solve it.Could you > help me for this > error? > Thanks for your attention > [EMAIL PROTECTED] > > > $dbname = 'mycmpe'; > > mysql_connect("localhost","username"); > if (mysql_select_db($dbname)) > { echo "connected";} > else > { echo "not connected";} > > $query="insert into dene (day,start_time) values > ("2003.09.25","22:30") " ; >$result=mysql_query($query); >if ($result)) > { echo "data girildi";} > else > { echo "data girilemedi"; > exit;} > > ?> > > -- > 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] parse error.
I am a new programmer of PHP4.3.3 an MySql 3.23 . When below script is executed "Parse error: parse error, unexpected T_DNUMBER in c:\program files\apache group\apache\htdocs\ilkdeneme21.php on line 17" is being seen. This may be very simple but I could not solve it.Could you help me for this error? Thanks for your attention [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Email Application
From: <[EMAIL PROTECTED]> > I am not so new in PHP but I have a problem. > I am trying to create a webmail program for my penpal > site. I cant retrieve and desplay e-mails from my mail > server. Any one with ideas? I have an idea. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Email Application
On Thu, 25 Sep 2003 00:42:21 +0300 [EMAIL PROTECTED] wrote: > Hey Guys, > > I am not so new in PHP but I have a problem. > I am trying to create a webmail program for my penpal > site. I cant retrieve and desplay e-mails from my mail > server. Any one with ideas? > Unless you are trying to achive something different from the other open source webmail packages, why re-invent the wheel?? I suggest that you find something that is close to what you want and modify from there. I'd suggest using IMp is for the mail server supports it. George Patterson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Record Selection
I have a table that the user can select numerous address's, I then want them to click submit and have a confirmation page that just shows the address's they selected. If you take a look at this you will see what I mean and where I have got to. ttp://www.tbptestsite.com/kaantest/index.php or download at http://www.tbptestsite.com/kaantest/calloff.zip on the 'ajr_calloff_selected.php' if the user does not add a quantity it shouldn't go through to the confirmation page, making it so only ones with quantities go to the confirmation page filtering out all the other records. Please could someone help me on this, I am completely new to PHP so this is all abit over my head. Many thanks in advance, Kaan. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Email Application
If your mail server supports IMAP, you should use the PHP IMAP functions. Very convenient. Ignatius _ - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 24, 2003 11:42 PM Subject: [PHP-DB] Re: Email Application > Hey Guys, > > I am not so new in PHP but I have a problem. > I am trying to create a webmail program for my penpal > site. I cant retrieve and desplay e-mails from my mail > server. Any one with ideas? > > Regards, > > ~ Charles > > -- > 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: Email Application
On Thursday 25 September 2003 05:42, [EMAIL PROTECTED] wrote: > I am not so new in PHP but I have a problem. > I am trying to create a webmail program for my penpal > site. I cant retrieve and desplay e-mails from my mail > server. Any one with ideas? With the limited amount of information give, I would say there is something wrong with your code. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db -- /* Marriage is the waste-paper basket of the emotions. */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Email Application
Hey Guys, I am not so new in PHP but I have a problem. I am trying to create a webmail program for my penpal site. I cant retrieve and desplay e-mails from my mail server. Any one with ideas? Regards, ~ Charles -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Photo Gallery Comments.. NOT WORKING
Hi, I see that you try to use $result, which is a resource [i think], as a normal string. Try to use the fetch data instead of the resource. vio- - Original Message - From: "Adam Symonds" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 23, 2003 9:14 AM Subject: [PHP-DB] Photo Gallery Comments.. NOT WORKING > Hi I have the following code which is a photo gallery, I have set it up so > users > can add comments to the photos, what I want to happen is in the gallery if a > user > has posted a comment on the photo, I want it to say comments under the photo > in the gallery, I have tried doing this using IN_ARRAY but I am getting an > error msg, > > Warning: in_array(): Wrong datatype for second argument > on line 203 > > line 203 is this: if(in_array($images[$i],$result))echo " class=blue>Comments"; > will have a play around with a few things and left yuo know if I suceed b4 > you get back. > > Can someone see what I am doing wrong with the in_array.. > > Thanx In advance > Adam > > == > > //start of comments selection... >$mysql_access = mysql_connect("localhost", "username", "password") or > DIE(mysql_error()); >mysql_select_db("database", $mysql_access) or DIE(mysql_error()); > $query = "SELECT * FROM comphotolink WHERE comphotolink.PhotoPath = > $PathVar"; >$result = mysql_query($query, $mysql_access) or DIE(mysql_error()); > if ($result) { > while ($r = mysql_fetch_array($result)) > { // Begin While > extract($r); > $PhotoName = $PhotoName; > //echo "$PhotoName "; > } //End While > } else { > echo "no comments"; > } > > //end of comments selection > > //page vars > $total = count($images); > $limit = 15; > $page = $_GET['page']; > $num_prow=3; > > //$offset = ($page - 1) * $limit; > > //$jpgs=0; > $handle=opendir($PathVar); > $index=0; > $images; > $last_updated; > > while($file=readdir($handle)){ > > if($file!='.' && $file!='..'){ > $myfile=explode(".",$file); > > if($myfile[1]=='jpg' || $myfile[1]=='JPG'){ > $images[$index]=$file; > //$size[$index]=filesize($file); > //$date[$index]=filemtime($file); > $thumb[$index]=$file; > $index++; > $jpgs++; > } > } > } > > if(!$images){ > print "::Warning::This folder contains no allowed image files."; > exit; > } > > $total=count($images); > > $numPages = ceil($total / $limit); > > > $j=0; > > // Set first set of pictures > if(!isset($pics)){$pics=$page * $limit;} > > //$pics = $page * $limit; > > > $from = $pics-$limit; > $pp = $pics+$limit; > // =OUTPUT= > > $query2 = "SELECT * FROM eventlistings WHERE PhotoPath = $PathVar"; >$result2 = mysql_query($query2, $mysql_access) or DIE(mysql_error()); > if ($result2) { > while ($r = mysql_fetch_array($result2)) > { // Begin While > extract($r); > echo ""; > }} //End While > > echo "$EventName - $EventDate > Directory contains a total of ".count($images)." image files "; > > echo " bordercolor=#CC33CC border=1 class=txt> bgcolor=White>"; > > for($i = $from; $i < $pics && $i < $total; $i++){ > > if($j == $num_prow){ > echo " > href=\"MainPhoto.php?Image=$thumb[$i]&PhotoPath=$PathVar\"> > > "; > if(in_array($images[$i],$result))echo " class=blue>Comments"; > echo ""; > // > $j = 1; > > }else{ > echo " href=\"MainPhoto.php?Image=$images[$i]&PhotoPath=$PathVar\">"; > // > if(in_array($images[$i],$result))echo " class=blue>Comments";// > > $j++; > > } > } > echo ""; > > if ($page == 1) // this is the first page - there is no previous page > echo "Previous"; > else// not the first page, link to the previous page > echo " "\" class=cssbtn>Previous"; > > for ($i = 1; $i <= $numPages; $i++) { > echo " | "; > if ($i == $page) > echo "$i"; > else > echo "$i"; > } > > if ($page == $numPages) // this is the last page - there is no next page > echo " | Next"; > else// not the last page, link to the next page > echo " | . "\" class=cssbtn>Next"; > /* > if($i < $total){echo " href=\"".$PHP_SELF."?PathVar=$PathVar&page=$pp\">Next";} > if($page != $total){echo " href=\"".$PHP_SELF."?PathVar=$PathVar&page=$total\">Last";} > */ > echo ""; > > closedir($handle); > ?> > > -- > 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] Photo Gallery Comments.. NOT WORKING
Hi I have the following code which is a photo gallery, I have set it up so users can add comments to the photos, what I want to happen is in the gallery if a user has posted a comment on the photo, I want it to say comments under the photo in the gallery, I have tried doing this using IN_ARRAY but I am getting an error msg, Warning: in_array(): Wrong datatype for second argument on line 203 line 203 is this: if(in_array($images[$i],$result))echo "Comments"; will have a play around with a few things and left yuo know if I suceed b4 you get back. Can someone see what I am doing wrong with the in_array.. Thanx In advance Adam == "; } //End While } else { echo "no comments"; } //end of comments selection //page vars $total = count($images); $limit = 15; $page = $_GET['page']; $num_prow=3; //$offset = ($page - 1) * $limit; //$jpgs=0; $handle=opendir($PathVar); $index=0; $images; $last_updated; while($file=readdir($handle)){ if($file!='.' && $file!='..'){ $myfile=explode(".",$file); if($myfile[1]=='jpg' || $myfile[1]=='JPG'){ $images[$index]=$file; //$size[$index]=filesize($file); //$date[$index]=filemtime($file); $thumb[$index]=$file; $index++; $jpgs++; } } } if(!$images){ print "::Warning::This folder contains no allowed image files."; exit; } $total=count($images); $numPages = ceil($total / $limit); $j=0; // Set first set of pictures if(!isset($pics)){$pics=$page * $limit;} //$pics = $page * $limit; $from = $pics-$limit; $pp = $pics+$limit; // =OUTPUT= $query2 = "SELECT * FROM eventlistings WHERE PhotoPath = $PathVar"; $result2 = mysql_query($query2, $mysql_access) or DIE(mysql_error()); if ($result2) { while ($r = mysql_fetch_array($result2)) { // Begin While extract($r); echo ""; }} //End While echo "$EventName - $EventDate Directory contains a total of ".count($images)." image files "; echo ""; for($i = $from; $i < $pics && $i < $total; $i++){ if($j == $num_prow){ echo " "; if(in_array($images[$i],$result))echo "Comments"; echo ""; // $j = 1; }else{ echo ""; // if(in_array($images[$i],$result))echo "Comments";// $j++; } } echo ""; if ($page == 1) // this is the first page - there is no previous page echo "Previous"; else// not the first page, link to the previous page echo "Previous"; for ($i = 1; $i <= $numPages; $i++) { echo " | "; if ($i == $page) echo "$i"; else echo "$i"; } if ($page == $numPages) // this is the last page - there is no next page echo " | Next"; else// not the last page, link to the next page echo " | Next"; /* if($i < $total){echo "Next";} if($page != $total){echo " Last";} */ echo ""; closedir($handle); ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php