[PHP-DB] Stored Procedures ?

2004-01-19 Thread Ricardo Lopes
Is possible to call database stored procedures from php with oracle or any other db?

Re: [PHP-DB] Stored Procedures ?

2004-01-19 Thread Ricardo Lopes
That's fantastic. Thank you very much. - Original Message - From: "Alban Médici (NetCentrex)" <[EMAIL PROTECTED]> To: "Ricardo Lopes" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, January 19, 2004 9:58 AM Subject: Re: [PHP-DB] Store

Re: [PHP-DB] replacing once with ereg_replace

2004-01-19 Thread Ricardo Lopes
$new_php_self = substr($PHP_SELF, 1); Does this has anything to do with db?? - Original Message - From: "lisi" <[EMAIL PROTECTED]> To: "PHP-DB" <[EMAIL PROTECTED]> Sent: Monday, January 19, 2004 10:21 AM Subject: [PHP-DB] replacing once with ereg_replace > I have a problem with two poss

Re: [PHP-DB] Windows 2003 Server

2004-01-19 Thread Ricardo Lopes
I use apache+php+mysql in a test environment in windowsXP and have no problems. Windows 2003 Server is a little new, but i think there are no problems. You could use more updated versions of apache and mysql, they are avaliable for some time and have some really nice new features. - Original

Re: [PHP-DB] Windows 2003 Server

2004-01-19 Thread Ricardo Lopes
Please post this message in english or spanish or portuguese, those are the only languages i understand. Por favory enviari mensagi in español, ingles o portugues. Io no parlare italiano. - Original Message - From: "Andrea Fenilxxx" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday

Re: [PHP-DB] Re: [PEAR] DB Module Extension Problem

2004-01-19 Thread Ricardo Lopes
In my windows PHP installation i have to uncomment i line in the php.ini file that has something like: ;extension=mssql.dll you have to configure your php ini file. Set extensions dir and uncomment the mssql.dll (you will probably have mssql.so or something like that) In my case the dll's where

Re: [PHP-DB] breaking apart data

2004-01-20 Thread Ricardo Lopes
You probably have more luck in a regular expression mailing list. Just an opinion. - Original Message - From: "Larry R. Sieting" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 20, 2004 4:17 PM Subject: Re: [PHP-DB] breaking apart data > duh (me) > > okay... I am w

Re: [PHP-DB] Drop down box NOT populated

2004-01-22 Thread Ricardo Lopes
- Original Message - From: Larry Sandwick To: [EMAIL PROTECTED] Sent: Thursday, January 22, 2004 3:46 PM Subject: [PHP-DB] Drop down box NOT populated Can anyone tell me what I am missing here, The Select statement does not populate my drop down window? My drop dow

Re: [PHP-DB] Results with ledger stripes?

2004-01-26 Thread Ricardo Lopes
I dont see what is your problem, your code do almost anything. Is you pretend to generate the output in html as you show in the example, you just have to add the color property in the "td" or "tr" tag, take care with the " in the code. ex: $dummy_var = 0; $dummy_array = array("#dd", "#ff")

Re: [PHP-DB] Problem with passing variables

2004-01-27 Thread Ricardo Lopes
If you have something like this: echo ''; It wont work. Use instead: echo ''; Notice the '. before the $myrow[0] and the .' after, any doubt see the documentation about operators. This is caused because the ' doesnt parse variables to values like the " does. - Original Message - From:

Re: [PHP-DB] Results with ledger stripes?

2004-01-27 Thread Ricardo Lopes
It isnt pretty, efficient or small, but it works... :) - Original Message - From: "Gary Every" <[EMAIL PROTECTED]> To: "Ryan Jameson (USA)" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, January 27, 2004 4:13 PM Subject: RE: [PHP-DB] Results with ledger stripes? Haven't been fo

Re: [PHP-DB] Problem with passing variables

2004-01-27 Thread Ricardo Lopes
nstead of: class="imglink" alt="Click to send mail to this person" />'; ?> use: there is a shorter way to print but i dont remeber the sintax, if you want to know consult the php manual. it is something like i guess This way the php sintax is reduced to its mini

Re: [PHP-DB] Unexpected Session Behavior on Mozilla

2004-01-29 Thread Ricardo Lopes
Both Internet Explorer and Mozilla browsers when you have multiple windows there is only one application instance running, this is done to save memory and make the program run faster. Probably (i'm not sure) Mozilla behaves diffent than Internet Explorer in this situation. My advice is that you co

Re: [PHP-DB] PHP and mail forms

2004-01-30 Thread Ricardo Lopes
There are several ways to do this. Some people like the approach: if ($submit) { send_email(); } or you can put a hidden field in your form, like op: and use: if (isset($HTTP_GET_VARS['op']) && ($HTTP_GET_VARS['op'] == 'send')) { send_email(); } and there are many others. by the way in t

Re: [PHP-DB] PHP and mail forms

2004-01-30 Thread Ricardo Lopes
elated to php. Good luck. BTW i guess there are other function you could use for sending email instead of mail consult the php documentation to know more. - Original Message - From: "Phil Matt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 30,

Re: [PHP-DB] Acessing a excel worksheet from a php site

2004-02-06 Thread Ricardo Lopes
In my modest opinion it woul be much easier and faster to export the worksheet as a CSV file and parse the file in PHP than creating a macro in VBA to extract the data to a text file. - Original Message - From: "Griffiths, Daniel" <[EMAIL PROTECTED]> To: "Bruno Pereira" <[EMAIL PROTECTED]>

Re: [PHP-DB] page hit tracking

2004-02-06 Thread Ricardo Lopes
you could create a counter table and store there the vegetable id and the hits. After that each time you search for a vegetable, make an update to the table. - Original Message - From: "js" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 06, 2004 8:18 AM Subject: [PHP-D

Re: [PHP-DB] Run SQL-Server command using PHP

2004-02-12 Thread Ricardo Lopes
You can use something like: SELECT MyFunction(); Thinks works on mySQL, i'm not sure if it works on mssql but you can give it a try. Tanks to Alban Médici (NetCentrex) who told me this a month ago on this list :) - Original Message - From: "indra Siregar" <[EMAIL PROTECTED]> To: <[EMAIL

Re: [PHP-DB] Accessing my variables

2004-02-12 Thread Ricardo Lopes
you forget the last ' on your include string: didnt you see the error message of php ? if dont change you error reporting for development, this an error easy to find out if you have your error reporting set to E_ALL. - Original Message - From: "J. Kevin C. Burton" <[EMAIL PROTECTED]> To

Re: [PHP-DB] Optimize Table

2004-02-13 Thread Ricardo Lopes
an be scheduled, they only execute when a client request the page. But you can schedule a job in you operative system to do that cron / at for *nix/linux, windows also have schedule managers. Hope it helps. Ricardo Lopes - Original Message - From: "Ng Hwee Hwee" <[EMAIL PROTE

Re: [PHP-DB] Optimize Table

2004-02-13 Thread Ricardo Lopes
sorry i have a great error in my last post, when i say: PhpmyAdmin or any other php script can be scheduled, i mean: PhpmyAdmin or any other php script _CAN_ _NOT_ be scheduled, it happends. - Original Message - From: "Ricardo Lopes" <[EMAIL PROTECTED]> To: "

Re: [PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Ricardo Lopes
To know the size of the images you could use a library like GD or something like that. You can also store one big image in your database and use the graphics library to create a temporary image that will be send to the client with the size / scale you want to send to the client. This way your 50k

Re: [PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Ricardo Lopes
004 3:36 PM Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db > Thank you Recardo > Is possible to know the dimensions (x, y) of the stored image? > > I try ImageCreateFromJPEG($mystoredpict) and ImagesX($mystoredpict) but > dosen't work > > - Original Message

Re: [PHP-DB] Brick Codes

2004-02-17 Thread Ricardo Lopes
That may depend of what database server you are using, for mysql you can use: WHERE (LEFT('Brick',3) = LEFT(Post Code,3)) If you are using other dbserver, check your manual. - Original Message - From: "Shaun" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 1

Re: [PHP-DB] Brick Codes

2004-02-17 Thread Ricardo Lopes
in locations to the same in the Brick table... > > > "Ricardo Lopes" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > That may depend of what database server you are using, for mysql you can > > use: > > > > WHERE

Re: [PHP-DB] Brick Codes

2004-02-17 Thread Ricardo Lopes
gnatius Reilly" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hmmm... > > > > Better try: > > WHERE (LEFT( Brick,3) = LEFT(`Post Code`,3)) > > ^^ no quotes ^^ back ticks (because of the > > space in

Re: [PHP-DB] Brick Codes

2004-02-17 Thread Ricardo Lopes
Ignore the previous post it has an error. This is the corrected sql: SELECT * FROM Locations L, Brick B WHERE (LEFT(L.'Post Code', LOCATE(' ', L.'Post Code')) = B.Brick) This should do it. - Original Message - From: "Ricardo Lopes" <[EMAI

Re: [PHP-DB] Update Statement

2004-02-18 Thread Ricardo Lopes
you could use: for ($i=0; $i< max; $i++) { mysql_query("update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no"); } OR if you use mysqlt daemon (support for transactions, in this case is best) mysql_query('BEGIN'); for ($i=0; $i< max; $i++) { if (! mysql_quer

Re: [PHP-DB] Search results of a previous query?

2004-02-18 Thread Ricardo Lopes
You can concat to the 1º filter statement the 2º. ex: SELECT * FROM atable WHERE (fieldname = fieldvalue) AND (fieldname2 = fieldvalue2) For the user to search twice in the same field i think you have to use the LIKE operator instead of the = and use the % in the string as wildcard. ex: 1º Searc

Re: [PHP-DB] Embedded MySQL server (libmysqld)?

2004-02-23 Thread Ricardo Lopes
The libmysqld is meant to be used as a database server embeded into application, not a replace or a lighter version of a database server, it can´t be used with php to provide a web page to the internet in the way i tink you want. The way of using libmysql is for what i read the same way you would

Re: [PHP-DB] Embedded MySQL server (libmysqld)?

2004-02-23 Thread Ricardo Lopes
lt;[EMAIL PROTECTED]> Sent: Monday, February 23, 2004 3:29 PM Subject: Re: [PHP-DB] Embedded MySQL server (libmysqld)? > Ricardo Lopes wrote: > > The libmysqld is meant to be used as a database server embeded into > > application, not a replace or a lighter version of a database s

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Ricardo Lopes
What is the error? there i something i always do when i have this problem, try this: error_reporting(E_ALL); $sql = "INSERT INTO log SET term='$search', returns='$arrayword', time=CURTIME(), date=CURDATE(), ip='$ip'"); echo $sql; $logit = mysql_query($sql); This makes all kind of notice about un

Re: [PHP-DB] Re: call to undefined function mysql_connect() [PHP / MySQL / Red Hat 8]

2004-02-26 Thread Ricardo Lopes
Call to undefined function mysql_connect(), this means that php doesnt reconize mysql_connect() as a function, this could be because you use the wrong name for the function (in this case it seems ok, check your code), or because the mysql extension isn't loaded (it is loaded by default, and it shou

Re: [PHP-DB] Re: call to undefined function mysql_connect() [PHP / MySQL / Red Hat 8]

2004-02-26 Thread Ricardo Lopes
d install them myself, but if I can sort it without having > to that would be great as I'm only just starting to get my head around Linux > after all these years. > > Thanks for your help guys :) > > Jono > > "Ricardo Lopes" <[EMAIL PROTECTED]> wrote in mes

Re: [PHP-DB] SQL File Import problem (Was: HELP!!!)

2004-02-27 Thread Ricardo Lopes
I have the same problem right now, after a very short search in google i found this: http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Gone _away In my case i get the message "max_allowed_packet is too small" because i was trying to insert an image > 1M into the database.

Re: [PHP-DB] plain-text file (.txt) to mysql database

2004-03-01 Thread Ricardo Lopes
I know this might sound a little bad, but i would use Perl or an editor that supports regulars expresions to convert the data into insert statements and after that i would use a database administration tool (ex. myCC) to insert the data, you could put some statements before doing the inserts to dis

Re: [PHP-DB] Bank Account Register

2004-03-03 Thread Ricardo Lopes
This is a simple normalized database that might work for you :), depends of the quantity of records you are going to register and other things. [Table Entities] idintauto_inrementPK entitty_namevarchar [Table HoursUsed] id int auto_inremen

Re: [PHP-DB] Protecting mysql database

2004-03-03 Thread Ricardo Lopes
if you want to close the whole database for a period, and that _NOBODY_ have access, just shutdown the service, and prevent it from starting the next time you restart your operative system. :) you could make mysql to log more than it normaly does to the logs and then analyse the log. You can even

Re: [PHP-DB] Mysql MaxDB Support?

2004-03-11 Thread Ricardo Lopes
MaxDB is based on sapdb, try searching for that you probably get better results because sapdb is older that maxdb. In the near future maxdb will support the mysql protocol, so i guess you could then use the mysql functions with maxdb. - Original Message - From: "Carolyn Longfoot" <[EMAIL P

Re: [PHP-DB] BLOB

2004-03-12 Thread Ricardo Lopes
i think this is the right sintax: SELECT * FROM `MEMBER` WHERE ISNULL(`PASSWD`) Passwd is a blob, that is an interesting name for a blob field, what are you planing to do? - Original Message - From: "Ng Hwee Hwee" <[EMAIL PROTECTED]> To: "DBList" <[EMAIL PROTECTED]> Sent: Friday, March 1

Re: [PHP-DB] An old dog, with a new trick..

2004-03-18 Thread Ricardo Lopes
So you want to learn php with mysql, good for you, well if you don't know this is a mailing-list for questions to doubts and in your post you have none. If you want to learn php a good place to start is the PHPManual and another good place is google.com search for "php tutorials" you will get some

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Ricardo Lopes
What is the problem in changig localhost in houndreds of scripts, ou can do that with a script or a good text editor that has the function Replace in Files... can do the trick. I dont think that editing the host file to make localhost point to the other machine is a good practice. :) - Origin

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Ricardo Lopes
vers > On 18 Mar 2004 at 11:15, Ricardo Lopes wrote: > > > What is the problem in changig localhost in houndreds of scripts, ou can do > > that with a script or a good text editor that has the function Replace in > > Files... can do the trick. > > Changing scripts is n

Re: [PHP-DB] How to simplify DB creation?

2004-03-19 Thread Ricardo Lopes
Yes, there are tools to do that. You could take a look at PEAR which have libraries to do that, that a look at HTML:HTML_Form (for making forms) and there are several others alternatives(http://phpformgen.sourceforge.net and http://www.hotscripts.com/PHP/Scripts_and_Programs/Form_Processors/), so

Re: [PHP-DB] Store a File (any type) in MySQL

2004-03-24 Thread Ricardo Lopes
As nobody seems to answer your question here, i will give you a pointer to an article i found i 30 seconds using google, i just searched for "insert blob mysql php" an i found this article in oReilly, and it seems that the article is based on a thread in the php mailing list. http://www.onlamp.com

Re: [PHP-DB] File upload bug

2004-03-25 Thread Ricardo Lopes
Hello Daniel, you said you change all the max_limit stuff in PHP/Apache, but did you change it on mysql ? by default the mysql_allowed_package is set to 1M, you have to add a line in your my.ini file (in my case this is in the windows directory, if you are using linux search google :)) In the se

Re: [PHP-DB] Stumped with proper query & display

2004-03-26 Thread Ricardo Lopes
i dont understand this part: "What's the smartest way to do the query ? I have 5 different tables I need to query. I guess I can get the data I want by selecting all from the 5 tables then parsing" Send your tables structure. - Original Message - From: "Mignon Hunter" <[EMAIL PROTECTED]

Re: [PHP-DB] DATE_SUB Issues

2004-03-30 Thread Ricardo Lopes
the first time i saw this post i get confused, let me see if i understand. you want the _CURRENT_ week stats OR the stats from the last 7 days if you want the first you cant use now the reason why that script works was because it was monday :) > SELECT SUM(distance), DATE_FORMAT(time_upload,

Re: [PHP-DB] DATE_SUB Issues

2004-03-30 Thread Ricardo Lopes
sorry, i press Control+Enter and i send the unfinished mail, here is the continuation: it worked because it was monday, probably today you arent happy. try this sql, but i dont like the GROUP clause SELECT SUM(distance), DATE_FORMAT(time_upload, '%u'), WEEK(time_upload, 1) FROM TRAININGLOG WHERE

Re: [PHP-DB] Tree structure - how to show only current branch ??

2004-03-30 Thread Ricardo Lopes
> Not to mention that I hate using others code i dont agrre with that, i guess probably you write your own string/date handling functions, you write your own code to connect to database and other stuffs right? :-) > it will take about as long to convert that to something workable in PHP, as it >