[PHP-DB] PLS Advise, Highlighted Text from a Query

2003-06-17 Thread nabil
Dear all, 1- I have a form with an input text : keyword 2- the field address is in my MySQL as TEXT field. 3- I select * from db where address like '%keyword%' 4- I want when echo the return $row["address"] to highlight the entered keyword (that the user has entered in the search form) in the outp

Re: [PHP-DB] time without seconds

2003-06-17 Thread Lisi
In general, is it better to have MySQL select less using TIME_FORMAT than to have PHP crop the info? -Lisi At 09:50 PM 6/17/03 -0400, John W. Holmes wrote: Lisi wrote: If I have a time stored in MySQL, and I only need the hour and minutes without seconds: 1) Can I crop this in PHP after retriev

RE: [PHP-DB] Select Statement with output in different colors.

2003-06-17 Thread Christopher Lyon
Thank you for the heads up. I did notice that is must have a ; after every variable case entry, e.g. $bg = 'blue'; in order to work right. That was at least how I had to get it working. > -Original Message- > From: Becoming Digital [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 17, 200

Re: [PHP-DB] Select Statement with output in different colors.

2003-06-17 Thread Becoming Digital
Here's a slight alteration to Peter's code in "case" someone isn't familiar with switch statements. Ooh, such a bad pun, as if there's any other kind. da da da   '; }// end while ?> Edward Dudlik Becoming Digital www.becomingdigital.com - Original Message - From: "Pet

[PHP-DB] Creating/Populating DB

2003-06-17 Thread Gerard Samuel
Im trying to make an install script that would run under MSSQL. I could make it either create a database or populate a database. I can't seem to do both. Has anyone been able to create and populate a MSSQL database via php in one shot?? Thanks -- PHP Database Mailing List (http://www.php.net/) T

RE: [PHP-DB] connecting to mySQL - testing server specified does not map to the http://localhost/_MMServerScript/MMHTTPDB.php

2003-06-17 Thread Creative Solutions New Media
PHP is for sure not installed correctly. I hand a similar problem when I did the install for the first time. It was a while agoand I don't remember clearly but I seem to remember that it had to do with mis-configuring apache for PHP. Honestly the best solution for all the time it would take

Re: [PHP-DB] time without seconds

2003-06-17 Thread John W. Holmes
Lisi wrote: If I have a time stored in MySQL, and I only need the hour and minutes without seconds: 1) Can I crop this in PHP after retrieving it? Sure, just chop off the last : and what's after it if in HH:MM:SS format, or the last two numbers if in HHMMSS format. 2) Is there a way to store th

Re: [PHP-DB] MySQL Transaction

2003-06-17 Thread John W. Holmes
Becoming Digital wrote: A question was raised on the MySQL list about implementing transactions with PHP. I had planned on them for an upcoming project but I'd yet to figure out how I'd coordinate things. The original author's solution (slightly altered) was to make an array with all the queries

Re: [PHP-DB] MySQL Connection

2003-06-17 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Would be grateful if someone couldkindly point me in the right direction. Whenever I try to connect to mysql server, I get these messsage back 1. mysql> GRANT ALL PRIVILEGES ON *.* TO moses@"%" IDENTIFIED BY "cludiana"; ERROR 1045: Access denied for user: '@127.0.0.1' (U

Re: [PHP-DB] connecting to mySQL - testing server specified doesnot map to the http://localhost/_MMServerScript/MMHTTPDB.php

2003-06-17 Thread John W. Holmes
Ildiko Nyari wrote: I have installed the PHP, mySQL and Apache on WIN XP, but: 1. when I want to open in the explorer: http://localhost/test.php I always get a download window, and than my Dreamweaver MX opens, and so I can't see the test.php file I created in the explorer. You don't have PHP/Ap

Re: [PHP-DB] MySQL Connection

2003-06-17 Thread Ramil G. Sagum
On Wed, 2003-06-18 at 08:16, [EMAIL PROTECTED] wrote: > Hello, > > Would be grateful if someone couldkindly point me in the right direction. > > Whenever I try to connect to mysql server, I get these messsage back > > 1. > mysql> GRANT ALL PRIVILEGES ON *.* TO moses@"%" IDENTIFIED BY "cludiana";

[PHP-DB] connecting to mySQL - testing server specified does not map to the http://localhost/_MMServerScript/MMHTTPDB.php

2003-06-17 Thread Ildiko Nyari
Hello, I have installed the PHP, mySQL and Apache on WIN XP, but: 1. when I want to open in the explorer: http://localhost/test.php I always get a download window, and than my Dreamweaver MX opens, and so I can't see the test.php file I created in the explorer. 2. When I created a php file in

[PHP-DB] MySQL Connection

2003-06-17 Thread moses . johnson
Hello, Would be grateful if someone couldkindly point me in the right direction. Whenever I try to connect to mysql server, I get these messsage back 1. mysql> GRANT ALL PRIVILEGES ON *.* TO moses@"%" IDENTIFIED BY "cludiana"; ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO)

RE: [PHP-DB] Select Statement with output in different colors.

2003-06-17 Thread Peter Lovatt
Try this $query = 'SELECT * FROM table $mysql_result = mysql_query($query, $link); while($row = mysql_fetch_array($mysql_result)) { switch ($row["event"] ) { case event_one: $bg = 'blue' break;

[PHP-DB] Select Statement with output in different colors.

2003-06-17 Thread Christopher Lyon
I have a php script that does some select statements, on mysql, and outputs that to a table. I would like to change the color of the table row depending upon one of the fields. The select statements are from a syslog database that I have and I would like to highlight key events by changing the colo

[PHP-DB] Updating a MySQL record

2003-06-17 Thread Stephen Sequeira
Hello from North Central University in Minneapolis. I have two forms. Both relate to required student ministry involvement (students must be involved in four semesters of Christian ministry to graduate). The first is a "credit registration" form which students fill out before starting a ministry.

[PHP-DB] Updating a MySQL record

2003-06-17 Thread Stephen Sequeira
Hello from North Central University in Minneapolis. I have two forms. Both relate to required student ministry involvement (students must be involved in four semesters of Christian ministry to graduate). The first is a "credit registration" form which students fill out before starting a ministry.

RE: [PHP-DB] Best way to pass multiple selections to a DB

2003-06-17 Thread Creative Solutions New Media
Thanks Richard and Edward, The naming of the list box as an array works great for passing the data around. Thanks. As for exactly what I need to do with the data I'm not exactly sure myself. PHP and mySQL is a bit new to me. I may be back for more help but for now thanks for the unbelievably qui

[PHP-DB] Re: PHP-DB - calling c function from php app

2003-06-17 Thread Hugh Bothwell
"Mignon Hunter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can anyone make a suggestion on how to connect to a c function from a > php app? > > I have to connect to sales tax calculation software. The function > is being written for me but I have to figure how to call it - get t

RE: [PHP-DB] problem witd freetds

2003-06-17 Thread Jennifer Goodie
> Parse error: parse error in /usr/local/www/data.default/test.php ] The parser is complaining about this line > $numero= mssql_connect("130.102.1.88" "sa" , " " ); Try putting a comma between your arguments $numero= mssql_connect("130.102.1.88", "sa", " " ); -- PHP Database Mailing List (htt

[PHP-DB] PHP-DB - calling c function from php app

2003-06-17 Thread Mignon Hunter
Can anyone make a suggestion on how to connect to a c function from a php app? I have to connect to sales tax calculation software. The function is being written for me but I have to figure how to call it - get the variable - and use it again in my php app. Is this even possible ?? Thx -- -

[PHP-DB] problem witd freetds

2003-06-17 Thread Alvaro Rosales R.
HI guys I have installed freetds and compiles php4 withmssql support. But when I ty to make a query from a web page it doest work , freetds is working fine cbecause I have tested it with tsql. My page looks like this: \n"); $numero2= mssql_select_db ( northwind ,northwind) $result=mssql_que

[PHP-DB] Re: Password generator

2003-06-17 Thread Andrei BEJENARU
Here's a little function that could help you... It uses the ASCII table to generate the characters and it still needs to be customized for any length and to deny the use of the special characters... Don't forget to set the mt seed! function generatePassword() { $passwd = ""; while(strlen($passwd

Re: [PHP-DB] Best way to pass multiple selections to a DB

2003-06-17 Thread Becoming Digital
> Can anyone enlighten me as to some techniques for transferring information > from a multiple select list box to mySQL. Not knowing how you need to insert the values (multiple entries, values in multiple fields), I would generate an array of the selections and loop through, either running individ

RE: [PHP-DB] Best way to pass multiple selections to a DB

2003-06-17 Thread Hutchins, Richard
Tim, You need to name your multiple select box as an array (e.g. selectThis[]). The values will be passed as an array to the next page. You then need to iterate over that array and pass the values into the database. There's plenty of info on how to pull this off in the archives on PHP.NET just se

[PHP-DB] Best way to pass multiple selections to a DB

2003-06-17 Thread Creative Solutions New Media
Hello, Can anyone enlighten me as to some techniques for transferring information from a multiple select list box to mySQL. Someone recommended something about using join tables for this (which I have no idea how to set up). Thanks Tim Winters Manager, Creative Development Sampling Technologies

[PHP-DB] MySQL Transaction

2003-06-17 Thread Becoming Digital
A question was raised on the MySQL list about implementing transactions with PHP. I had planned on them for an upcoming project but I'd yet to figure out how I'd coordinate things. The original author's solution (slightly altered) was to make an array with all the queries and loop through them, s

Re: [PHP-DB] 4.2.3 session login problem...

2003-06-17 Thread CPT John W. Holmes
> I have an application that is currently working fine under 4.1.2, > and I am in the process of upgrading to 4.2.3. The problem is that after > upgrading PHP the application login no longer works. Additionally, this > same application works fine on another machine running 4.2.3. The only > diff

[PHP-DB] ODBC conection with DB2

2003-06-17 Thread Norma Ramirez - TECNOSOFT
Hi, I need to do a ODBC conexión with DB2 over AS400 for a php aplication, my aplication is in a web server wiht linux red hat 7.0, I´ve already downloaded the unixODBC driver and the iSeriesODBC from IBM page, but when I run the installation command: rpm -ivh iSeriesODBC-5.1.0-0.xx..rpm. I

[PHP-DB] 4.2.3 session login problem...

2003-06-17 Thread NIPP, SCOTT V (SBCSI)
I have an application that is currently working fine under 4.1.2, and I am in the process of upgrading to 4.2.3. The problem is that after upgrading PHP the application login no longer works. Additionally, this same application works fine on another machine running 4.2.3. The only differ

[PHP-DB] FW: Call to undefined function: mysql_connect

2003-06-17 Thread Idan Dolev
> -Original Message- > From: Idan Dolev > Sent: Tuesday, June 17, 2003 2:52 PM > To: '[EMAIL PROTECTED]' > Subject: Call to undefined function: mysql_connect > > HI, > I am using redhat 9 2.4.20-9 kernel and the following rpm's > MySQL-devel-4.0.13-0 > MySQL-server-4.0.

[PHP-DB] Testing - please ignore

2003-06-17 Thread Milan Babuskov
It seems that my previous post didn't reach the ML, so I'm trying to see if it works. Sorry. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] time without seconds

2003-06-17 Thread Ignatius Reilly
Check the TIME_FORMAT(time,format) MySQL function. Ignatius _ - Original Message - From: "Lisi" <[EMAIL PROTECTED]> To: "PHP-DB" <[EMAIL PROTECTED]> Sent: Tuesday, June 17, 2003 1:16 PM Subject: [PHP-DB] time without seconds > If I have a time stored in MySQL, and

[PHP-DB] time without seconds

2003-06-17 Thread Lisi
If I have a time stored in MySQL, and I only need the hour and minutes without seconds: 1) Can I crop this in PHP after retrieving it? 2) Is there a way to store this without the seconds in MySQL? Same goes for storing a date without the year. I could use a regular char field, but I want to be

Re: [PHP-DB] Password generator

2003-06-17 Thread Ramil G. Sagum
> a simple way would be to : $pass = $allowable_characters[mt_rand(0,$ps_len-5)] for($i = 0; $i < ($length -2); $i++) { $pass .= $allowable_characters[mt_rand(0,$ps_len-1)]; } $pass .= $allowable_characters[mt_rand(0,$ps_len-5)] // This variable contains the list of allo

[PHP-DB] Password generator

2003-06-17 Thread Davy Obdam
Hi people, I have to make a password generator, but i have a little problem. - It needs to generate password 8 characters long, and including 1 or 2 special characters(like #$%&*@). - Those special characters can never appear as the first or last character in the string... anywhere between is f

[PHP-DB] RE: Save mySQL data into a CSV file.

2003-06-17 Thread Colin Williams
Hi, You can use a content header to instruct the browser to treat output as an attachment for saving. Use something like the following: (These *must* be the first lines output by your script) Then in the body of the script, do something like this: Note the commas between each value, and