RE: [PHP-DB] Parse error
try: ? $origVar = 100; echo POriginal value is.$origVar./p; $origVar += 25; echo PAdded a value, now it's .$origVar./p; $origVar -= 12; echo PSubtracted a value, now it's .$origVar./p; $origVar .= chickens; echo PFinal answer: .$origVar./p; ? Cami -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 2:33 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Parse error Can someone tell me why I am getting a parse error in this little snip? ? $origVar = 100; echo POriginal value is $origVar/p; $origVar += 25; echo PAdded a value, now it's $origVar/p; $origVar -= 12; echo PSubtracted a value, now it's $origVar/p; $origVar .= chickens; echo PFinal answer: $origVar/p; ? Thanks in advance Jen Downey -- 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] I cant get the logic for this...
Hi Dave, I wrote the following script which does exaclty that. Cami ? mysql_connect ($hname, $usrname, $password) OR DIE (unable to connect); $selectstmnt = your sql statement; $result = mysql_db_query ($dbname, $selectstmnt); $numrows = mysql_num_rows($result); $i=3; echo table cellpadding=0 border=0 callspacing=0; if ($result) { while ($list = mysql_fetch_array ($result)) { if($i==3) { $i=0; echo tr; } echo td width=\126\ height=\23\ valign=\middle\ align=\center\.$list[yourvariablename]./td; $i++; if($i==3) { echo /tr; } } // end while fetch_array if ($numrows%3==2){echo tdnbsp;/td/tr;} if ($numrows%3==1){echo tdnbsp;/tdtdnbsp;/td/tr;} } //end if numrows0 echo /table; ? -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 2:14 PM To: Dave Carrera; php List Subject: Re: [PHP-DB] I cant get the logic for this... I want to display return results from my query (which works fine) In I tidy way on screen. So my result returns say seven results, I have a table, and I want to show 3 results per row of the table... I.e.: Table TR TD = result1 /TD TD result2 /TD TD = result3 /TD /TD /TR TR TD = result4 /TD TD result5 /TD TD = result6 /TD /TD /TR TR TD = result7 /TD TD resultempty /TD TD = resultempty /TD /TD /TR /table The last two td in row 3 are empty because result found 7 results. This cant be fixed so echo statements wont work as the result could Be 3 or 10 or 56 or whatever. As Always your help and or guidance in this matter is appreciated. You need a incrementer variable so you can tell when you have 3 td cells built, so you know when to end the current tr and start a new one. Then, you need to test that variable again when you run out of mysql_num_rows(), and fill the 1 or 2 needed td cells with nbsp; Also, you might wanna look around for some table building classes if your data is always gonna be really abstract. Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ -- 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] sending bulk emails
Hi guys, Does anybody know how to send bulk emails using php? Thanks, Cami -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: RE: [PHP-DB] sending bulk emails
Oh dear, Please do not worry. I would never send spam emails. One of my clients for which I am developing a database want to be able to send his members emails . The problem would have been simple if he had a few members but he has tens of tousands. So with some help from some of you and adopting a send mail library I think that now is in the process of being sorted. So just to calm you guys down. I would never do a spam email. Thank you everybody for your help, Cami -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] MySQL: Alphabetizing title results in library format
Hi Ian, Try this: mysql select *,(case when title like '%The%' then substring (title, 5, 255) when title like '%A%' then substring (title, 3, 255) when title like '%An%' then substring (title, 4, 255) else title end) as sort_col from titles order by sort_col; Hope it helps, Cami -Original Message- From: Ian Evans [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 9:20 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL: Alphabetizing title results in library format Petr Tuma wrote: What error message it produce? Ok, table titles is composed of: +--+-++ | titlesid | releaseyear | title | +--+-++ mysql select *,(case when title like 'The %' then substring (title, 5, 255) when title like 'A %' then substring (title, 3, 255) when title like 'An %' then substring (title, 4, 255) else title end) as sort_col from titles order by sort_col; ERROR 1064: You have an error in your SQL syntax near 'when title like 'The %' then substring (title, 5, 255) when title like 'A %' the' at line 1 -- Ian Evans Digital Hit Entertainment - News and Information http://www.digitalhit.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] MySQL: Alphabetizing title results in library format
Have you tried it like this: mysql select case when title like '%The %' then substring (title, 5, 255) when title like '%A %' then substring (title, 3, 255) when title like '%An %' then substring (title, 4, 255) else title end as sort_col from titles order by sort_col; I can't tested, but that's what the manual say. Cami -Original Message- From: Ian Evans [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 9:20 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL: Alphabetizing title results in library format Petr Tuma wrote: What error message it produce? Ok, table titles is composed of: +--+-++ | titlesid | releaseyear | title | +--+-++ mysql select *,(case when title like 'The %' then substring (title, 5, 255) when title like 'A %' then substring (title, 3, 255) when title like 'An %' then substring (title, 4, 255) else title end) as sort_col from titles order by sort_col; ERROR 1064: You have an error in your SQL syntax near 'when title like 'The %' then substring (title, 5, 255) when title like 'A %' the' at line 1 -- Ian Evans Digital Hit Entertainment - News and Information http://www.digitalhit.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Transforming doc files into html
Hi there, Does anybody know if is any way in which when you upload a word document file you can parse it and transform it into an html file? Is this possible ? Has anybody tried it? I know I can transform it into a txt file but wouldn't it be even better if we can do an html file? Thanks, Cami -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Error 127
Hi everybody, All of the sudden I got an error one of mysql tables. Got error 127 from table handler. Can't browse it not even from phpmyadmin get the same error. Anybody had this before? What do I do to recuperate my table? I really appreciate any help, Thanks, Cami -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Error 127
Thanks everybody for pointing me to the right place. I manage to recover it. Thank God. Cami -Original Message- From: Cami [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 19, 2001 3:57 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Error 127 Hi everybody, All of the sudden I got an error one of mysql tables. Got error 127 from table handler. Can't browse it not even from phpmyadmin get the same error. Anybody had this before? What do I do to recuperate my table? I really appreciate any help, Thanks, Cami -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Only Insert on Error?
Try using ' instead of \ like: if ($M_First_Name) { $sql = INSERT INTO $table_name (First_Name, Last_Name, Family_Position, Address, Address1, City, State, Zip, Email, Home_Phone, Work_Phone, Coop_Month, Timestamp) VALUES ('$M_First_Name', '$M_Last_Name', '$MatherFamilyPosition','$M_Address1', '$M_Address2', '$M_City', '$M_State', '$M_Zip', '$M_Email', '$M_H_Phone', '$M_W_Phone', '$coopmonth', 'NOW()'); if(! $result = mysql_query($sql,$connection)) { print(ERROR .mysql_errno().: .mysql_error().br\n$sqlbr\n); } } if ($M_First_Name) { $sql = INSERT INTO $table_name (First_Name, Last_Name, Family_Position, Address, Address1, City, State, Zip, Email, Home_Phone, Work_Phone, Coop_Month, Timestamp) VALUES ('$M_First_Name', '$M_Last_Name', '$MatherFamilyPosition','$M_Address1', '$M_Address2', '$M_City', '$M_State', '$M_Zip', '$M_Email', '$M_H_Phone', '$M_W_Phone', '$coopmonth', 'NOW()'); // if(! $result = mysql_query($sql,$connection)) { // print(ERROR .mysql_errno().: .mysql_error().br\n$sqlbr\n); // } } Hope it works, Cami -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]