Re: [PHP-DB] anyone trickier than 'LIKE' ?

2003-12-12 Thread Larry E . Ullman
I have this data (eg.) "..big fat buddy..." on the database . If a person enter "big buddy" in the search form , the "...big fat buddy." data will not be found . Any suggestion ? select * from table where data like "%keywords%"; You can break up the search terms into words

Re: [PHP-DB] How to redirect after a valid login

2004-03-12 Thread Larry E . Ullman
Is there a way that after a execution of a Login script and validation of login from a MySql database to automatically redirected to run another script ? Use PHP's header() function. See the manual for syntax. Larry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP-DB] Rounding

2004-04-07 Thread Larry E . Ullman
6.11 --> 6.2 6.15 --> 6.2 6.19 --> 6.2 6.20 --> 6.2 i know there is a ceil() function but that rounds up to the nearest integer.. i need one decimal place still.. If my math is right, you could multiply the number by ten, take the CEILING(), then divide that by 10. Larry -- PHP Database Mailing

Re: [PHP-DB] SQL question!

2004-05-03 Thread Larry E . Ullman
I have these tables. Users ( id,name,etc ) Coments : ( id , comment ) How do I do this kind of query: I thought in one thing like this but I cant figure it out. Example: Select * from users order by id desc in (select count (id) from comments) Expected result: List of users: * User1 See comments

Re: [PHP-DB] password () function.

2004-06-10 Thread Larry E . Ullman
Is this function, password() available at PHP Ander Windows? I get an undefinied function error message! There is no PASSWORD() function in PHP. There is, however, a PASSWORD() function in MySQL and other database applications. Larry PS It looks like you hijacked someone else's thread, which you

Re: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread Larry E . Ullman
Online I could see everything, and the pages gave the appearance of working, however when I went into the DB using PHPMYADMIN to check the status of the new data entered, all I found was blank rows ( for the new data since the rebuild, all the old data was there) There were the correct number of

Re: [PHP-DB] Auto increament

2004-06-27 Thread Larry E . Ullman
Can any of you guide me how to do auto increament in a field? I think there is one datatype for auto increament. But I dont know how to do it ? I'd start by reading the manual and documentation for the database application being used. But, generally, auto incremented fields are primary keys, unsi

Re: [PHP-DB] Call to undefined function mysql_connect()

2004-06-27 Thread Larry E . Ullman
But i received "Call to undefined function mysql_connect() on line 5" Can anyone help me? Your PHP installation apparently does not support MySQL. You can confirm this by running a phpinfo() script. You may need to reinstall/recompile PHP. Larry -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] mysql_fetch_object

2004-06-28 Thread Larry E . Ullman
I'm using $row = mysql_fetch_object and I can reference column names by $row->name but how do I reference a pseudo column (that I make, like substring( name from 1 ))? Use an alias in your query: SELECT column, DATE_FORMAT('%m', date_column) AS d FROM table ... $row->d Larry -- PHP Database Maili

Re: [PHP-DB] Random select -- Where am I going wrong?

2004-07-04 Thread Larry E . Ullman
Here is my code I keep on getting a Resource id #2 ..whatever that meansany help would be appreciated! $music = mysql_query ("Select * from $db_table ORDER BY RAND() Limit 1"); if(!$music) die("Query Failed."); while($row = mysql_fetch_row($music)) print "$music"; } This is because

Re: [PHP-DB] PHP use in Federal Govt

2004-07-16 Thread Larry E . Ullman
My division at State is trying to get PHP 5.0 approved for use by developers in the Department, and the Powers That Be are requesting evidence that other Federal agencies/military are using PHP, and the extent of it's use. Anybody have a clue about this? I sure would appreciate some help! I've

Re: [PHP-DB] howto get PK id after INSERT??

2004-07-19 Thread Larry E . Ullman
I have a form to insert customer data into a table. The form goes to php page to input data to db hen uses header to go to a final page displaying customer's information. Is there a way to get the ID (custid PK UNIQUE AUTO_INCREMENT) from mysql after INSERT then pass to final page using urlencode

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

2004-07-22 Thread Larry E . Ullman
$thing = "[EMAIL PROTECTED]"; $query = "SELECT id, email, familyname FROM members WHERE email=$thing"; You need to quote non-numeric values in SQL. It should be $query = "SELECT id, email, familyname FROM members WHERE email=''$thing'"; Also, you don't really need to select the email value since

Re: [PHP-DB] mac and mysql

2004-08-31 Thread Larry E . Ullman
Mac users, please forgive such a Windows-centric question, but I need your help. And you can educate me in the process. I am helping a student of mine set up a development environment with php, mysql, and a webserver, and she uses a Mac. Are there any installation issues unique to mac that I sh

Re: [PHP-DB] auto_increment

2004-12-26 Thread Larry E . Ullman
I have the auto_increment on one of my variables. During the past few days I have been doing testing on a "live" database and created several test records which I now have deleted from my table. Is there any way of setting the auto_increment value to match the last "correct" number? Ron You do

Re: [PHP-DB] '

2005-01-17 Thread Larry E . Ullman
When I submit my forms, if any textfield contains a ' the result comes back with /' Is there anyway of stopping this? Yes, either: - turn off Magic Quotes GPC or - use stripslashes() Larry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] php-mysql connect

2003-01-12 Thread Larry E. Ullman
I've setup a form to submit data into my MySQL database and it appears to connect properly and whatnot but when I check to see that the data has been inserted properly using phpMyAdmin, the table refelcts a new row entry but the fields are empty. ??? I suspect this is a register_globals problem

Re: [PHP-DB] db connect probs

2003-01-14 Thread Larry E. Ullman
do you have any idea why the following(line 106)would return the following error message ? the login.php has an included form to create an account and that is what will not connect. $connection = mysql_connect($host, $user,$password) //this is line 106 Warning: Access denied for user: 'x,@hos

Re: [PHP-DB] SELECT problem

2003-01-17 Thread Larry E. Ullman
    Hello PHP world!!! i've just finisched installing Apache 1.3.27 with PHP4 and 1.4 in Windows 2000. I've installed all off the scripts that function all right in Linux Red Hat in Windows 2000, but when it comes to do a simple select to a table that does exist and the select is all right ther

Re: [PHP-DB] elseif with header

2003-01-20 Thread Larry E. Ullman
if ($category = 2 and $subcategory = 52) { header("Location: http://www.vanderbilt.edu/register/ca/vacation_rentals.php";); } elseif ($category = 2 and $subcategory = 50) { header("Location: http://www.vanderbilt.edu/register/ca/rentals.php";); } , etc. for some reason all the elseif

Re: [PHP-DB] What about MySQL

2003-02-24 Thread Larry E. Ullman
I am a fresh man in MySQL,Can anyone tell me how i begin to learn it? www.mysql.com is a really good place to start. and what are the different between MySQL and other commerce relative database?As what I known,My SQL is free,but other commerce RDB is very expensive! Why MySQL not in th

Re: [PHP-DB] mysl_connect question

2003-04-05 Thread Larry E. Ullman
First, please don't cross-post. The PHP-DB list is the proper one for this question. If you can connect via the mysql monitor but not with PHP, I expect the problem has to do with your host. Larry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP-DB] Right-click

2003-04-05 Thread Larry E. Ullman
First, this should probably be sent to the PHP general mailing list, not the PHP-DB one. Does anyone know if there is a function in PHP that allows you to right-click on an item, and from there a drop down menu pops up and you can go to another screen, preserving that value that was clicked on? N

Re: [PHP-DB] MySQL

2003-08-01 Thread Larry E . Ullman
I just need to know how to enter the data submitted by an html form into a MySQL DB. I have already created the form, and the variables in that form - just need to know the query use to insert that data. The query will be something like INSERT INTO tablename (column1, column2, column3, ...) VALU

Re: [PHP-DB] ODBC Database

2003-08-10 Thread Larry E . Ullman
Im looking at venturing into working with PHP's ODBC extention. Does anyone have any recommendations as to a Database, that is easy to understand/get into from a novice point of view, that installs on windows 2k, and is "free"? MySQL is kind of free, installs on W2K and is easy to use but it does

Re: [PHP-DB] full text search in mysql

2003-08-14 Thread Larry E . Ullman
As of Version 4.0.1, MySQL can also perform boolean full-text searches I am running Mysql 3.x . This sounds like a simple task to me. Is it not implemented in 3.x? It does not have to be OR, NOR or anything, just AND I've never tried it, but you might be able to get away with SELECT columns FROM

Re: [PHP-DB] full text search in mysql

2003-08-14 Thread Larry E . Ullman
I do get results for islands in greece as well. How can I specify in my statement, that both words have to be present? From the MySQL manual: As of Version 4.0.1, MySQL can also perform boolean full-text searches using the IN BOOLEAN MODE modifier. mysql> SELECT * FROM articles WHERE MATCH (title

[PHP-DB] Re: [PHP] php|cruise - do unto others...

2003-10-20 Thread Larry E . Ullman
To make a donation, simply login to PayPal and click the "Send Money" tab at the top of your screen. Once there, put [EMAIL PROTECTED] in the "Recipient's Email" field and fill out the remaining fields to your liking. :) Even though this thread is much more PHP-related than many of the topics

Re: [PHP-DB] removing space ?

2003-10-28 Thread Larry E . Ullman
When I select data from my data base I have spaces on the lead side for example the data that is stored is " 33.jpg". Spaces included, exclude the quotes, quotes are example only to show the spaces. I would like to remove these spaces. Is there a way to do this? You can definitely do this an

Re: [PHP-DB] date function

2003-11-02 Thread Larry E . Ullman
This might not be the best place for this but here goes. You are correct. At the very least, you should probably be using the general PHP list, not the database one. I want to create a dropdown list with a date range of Not to be obstinate, but it looks like you already have. But, assuming t

Re: [PHP-DB] MySQL - Query within a query

2005-03-19 Thread Larry E . Ullman
I am looking to do the following w/ MySQL and PHP. Have 1 query that gets results, then use those results in another query: $l = 2; $result1 = ("SELECT * FROM Drivers WHERE League = $l"); $result2 = mysql_query("SELECT DriverID, Driver, CarNbr FROM Drivers LEFT JOIN $LeagueList ON Drivers.Drive

Re: [PHP-DB] Why not ?

2005-03-24 Thread Larry E . Ullman
Why does this NOT work? UPDATE tipping SET score = 3 WHERE round1.game1 = H AND tipping.username = jerry; For starters, you should quote strings in a query. There may also be a problem with the round1 reference. Larry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP-DB] Batch queries in the same mysql_query()

2005-06-28 Thread Larry E . Ullman
I'm trying to execute multiple queries using mysql_query() function and I'm getting an error to check SQL syntax. My PHP code looks like: You cannot execute multiple queries at once using mysql_query(). If you are using PHP 5.x and MySQL 4.1.x, there are new functions, one of which does allow

Re: [PHP-DB] what is the value of session_register

2005-09-22 Thread Larry E. Ullman
Is there any values to this function? I'm looking over some code where this is a done a bunch of time and I don't see any value to it. Maybe I'm naive about the internals but... I'm not certain as to what exactly you are asking, but prior to PHP 4.1, I believe (possibly 4.2), session_regis

Re: [PHP-DB] URL Forwarding in PHP...

2005-09-26 Thread Larry E. Ullman
How can I automatically forward to an external URL using PHP? header('Location: http://espn.go.com'); exit; Larry -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] oracle complex type and oci_new_collection

2005-09-28 Thread Larry E. Ullman
Seriously, how many times are you going to send this email to the list? I've seen it at least 5 times now in the past day, all the same email under slightly different FROM and subjects. Send an email once. If someone can answer, they will. On Sep 28, 2005, at 10:18 AM, Hal McFarlane wrote:

Re: [PHP-DB] Connecting to two MySQL databases

2005-09-29 Thread Larry E. Ullman
I am working on an application that requires me to connect to two MySQL databases both hosted on the same server. I have an existing set of class files I created to handle the db connection to the main database. To connect to the second database, I duplicated my db class files and renamed t

Re: [PHP-DB] Connecting to two MySQL databases

2005-09-30 Thread Larry E. Ullman
I had this problem a while ago, when you try to create the second connection to the database with the same login credentials, i.e username and password. If mysql / php detect there is a connection already established with those details it will return that specfic resouce and not create an ne

Re: [PHP-DB] Passwords

2006-03-08 Thread Larry E. Ullman
I have created a user login/registration page. As of now I am using a MySQL database to store the info of the user. To validate the user I also have the password stored in the same DB. I was wondering if there is a way that I can store the password in the DB so that it is encrypted or so

Re: [PHP-DB] Displaying data in different languages

2006-05-14 Thread Larry E. Ullman
Functions like CONVERT(), and there is a MySQL equivalent, will change the character set of some text. It WILL NOT change text from English to Japanese. As another person noted, you'll need to stored the string in both languages. There is no translator available. Larry On May 14, 2006, at