[PHP] Adding zeros in front
Hi all, Does anyone remembers how to add zeros in front of a result number given by a query to MySQL and returned as an array, so it always shows a 4 digit number? I have: [snip] echo $row[main_group]./.$row[sub_group]; [snip] but throws out: 1/0 2/0 3/0 instead of: 0001/0 0002/0 0003/0 which it should. Thanks in advance, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
RE: [PHP] Adding zeros in front
str_pad worked!!! Thank you all... César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-356688 (0299) 446-6621 -Mensaje original- De: Clay Loveless [mailto:[EMAIL PROTECTED]] Enviado el: Martes, 11 de Junio de 2002 12:35 a.m. Para: PHP-General Asunto: Re: [PHP] Adding zeros in front Try this: echo str_pad($row[main_group],4,0,STR_PAD_LEFT)./.$row[sub_group]; -Clay From: César L. Aracena [EMAIL PROTECTED] Date: Tue, 11 Jun 2002 00:11:30 -0300 To: PHP General List [EMAIL PROTECTED] Subject: [PHP] Adding zeros in front Hi all, Does anyone remembers how to add zeros in front of a result number given by a query to MySQL and returned as an array, so it always shows a 4 digit number? I have: [snip] echo $row[main_group]./.$row[sub_group]; [snip] but throws out: 1/0 2/0 3/0 instead of: 0001/0 0002/0 0003/0 which it should. Thanks in advance, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHPMyAdmin Alternative?
Look in http://www.mysql.com/downloads/gui-mycc.html and download the latest version of MyCC, which helped me to manage the DBs on the server. I found a problem with the current version, but one of it's developers told me to wait 'till next week when the new release is available. The problem is that you can't issue multiple SQL queries, but that will be solved. César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-356688 (0299) 446-6621 -Mensaje original- De: John Taylor-Johnston [mailto:[EMAIL PROTECTED]] Enviado el: Domingo, 09 de Junio de 2002 01:33 a.m. Para: [EMAIL PROTECTED] Asunto: [PHP] PHPMyAdmin Alternative? Are there alternatives to PHPMyAdmin available? www.mysql.com/ is supposed to have one, no? -- John Taylor-Johnston -- --- - Université de Sherbrooke: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MyCC Problem
Hi all. I know that this isnt probably the best place to make this question, but I uses that some of you uses MyCC to connect to a remote MySQL DB. My connection is no problem, but when I issue a SQL command, which tells the DB to INSERT multiple rows into one table, It gives me an error every time. Imagine what it takes to pass a 1000 rows to the live DB one each time. Does anyone who uses MyCC had this problem before? Know how to solve this? Thanks in advance, Cesar mailto:[EMAIL PROTECTED] Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621
[PHP] mail() problem
Hi all, I have this strange problem where I can send e-mails from a PHP script to a common e-mail address such as Hotmail's, but I can't send to my ISP-given e-mail address (@infovia.com.ar). Does anyone happen to know why is it that makes it different??? Thanks, Cesar Aracena [EMAIL PROTECTED] Neuquen, Argentina
RE: [PHP] mail() problem
Ok. I've done everything that all of you told me to do, but still can't get to send e-mails to my ISP's mail address. I did all of the following: a) Append a Reply-To: [EMAIL PROTECTED] (Actually, its [EMAIL PROTECTED] ) b) Send the e-mail to my Hotmail account, but everything seems fine. The address shown at the From: line is even the one I used in the Script. c) Because I have placed the Script into a server and not a local machine, asked the sysadmin to check the php.ini file and so but nothing. This step is crucial for my scripting and because all of my clients live here, most of them use the same ISP and have to get their e-mails. Actually, I didn't know how to change the content-type for my e-mail in order to do some testing. Can anyone help me with this? Might be my last chance... Thanks in advance, mailto:[EMAIL PROTECTED] César Aracena IS / MCSE+I Neuquén, NQN (0299) 156-356688 (0299) 446-6621