[PHP-DB] Re: troubles with select * from... to a ms-sql-server

2002-04-25 Thread Hermann Otteneder
hi, thanx for replying! i installed the new php version 4.2 - but this time as isapi-module. and since this i have no troubles! ( i used not the php.ini.recommend! ) bye - hermann Oliver Cronk [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Have you tried

[PHP-DB] Search Script

2002-04-25 Thread Jennifer Downey
Hi all, I have been trying to build a search script for my site that deals with only one table in my db. As Julie Meloni pointed out look in the MySQL manual for LIKE clauses I can't seem to locate that clause in ether manual. Dan Brunner gave me this to go on: $query = SELECT uid, id, image,

Re: [PHP-DB] Search Script

2002-04-25 Thread Maureen
The query should read as below, without the = after the LIKE: $query = SELECT uid, id, image, iname, quantity, type FROM {$config[prefix]}_shop WHERE iname LIKE '%$shopsearch% ORDER BY iname'; HTH Maureen Jennifer Downey [EMAIL PROTECTED] said: Hi all, I have been trying to build a

Re: [PHP-DB] Search Script

2002-04-25 Thread Maureen
Sorry about that, I just pasted and took out the =, but I see another thing that could be a problem: $query = SELECT uid, id, image, iname, quantity, type FROM {$config[prefix]}_shop WHERE iname LIKE = '%$shopsearch%' ORDER BY iname; The single quote was in the wrong place, it should have

Re: [PHP-DB] Search Script

2002-04-25 Thread Miles Thompson
Jennifer, In the manual it's probably under the SELECT heading. (I've not checked, but that's a godd spot to start looking for the bits that can amke up the WHERE clause.) Try removing the single quotes - you have one before %shopsear and another following iname, as iname' Sorry this is

Re: [PHP-DB] Search Script

2002-04-25 Thread Miles Thompson
And Maureen is right! We just so *used* to seeing equal signs in SELECT statements. Smacking fist on head Miles Thompson At 02:23 PM 4/25/2002 +, Maureen wrote: The query should read as below, without the = after the LIKE: $query = SELECT uid, id, image, iname, quantity, type FROM

Re: [PHP-DB] Search Script

2002-04-25 Thread Jennifer Downey
Thanks Maureen, I don't get the errors I was getting so that shows me you are great. Now my next problem is if an item is found how do I echo or print that to the screen. I have this as a starting point but I don't know where to go after this. if($search) { $query = SELECT uid, id, image,

Re: [PHP-DB] Search Script

2002-04-25 Thread Maureen
From what I can see, you are not defining the array $row in here. You would need to define something like: $row=mysql_fetch_array($ret); before calling it. I finally found where the information on LIKE is in the manual (I can understand your frustration, it took me a while). It is under

Re: [PHP-DB] Search Script

2002-04-25 Thread Dan Brunner
Hello!! Your right!! don't use = on the like part...I don't know what I was thinking!!! Anyway here is the code right from my search page... include(./navbar2.php); $nav = new navbar; $nav-numrowsperpage = 30; $sql = SELECT Print_Name, Art_Job_Number, Size, Item_Number

[PHP-DB] Variables

2002-04-25 Thread Julio Cuz, Jr.
HI-- * I have the following variables: $c1 thru $c10. * I also have a FOR loop like this: for($count = 0; $count sizeof($artist); $count++) { echo i$artist[$count]/ibr; } // $artist is a list of ten (10) artist's names. * What I'm trying to do is

RE: [PHP-DB] Variables

2002-04-25 Thread Ryan Jameson (USA)
I think what you don't know is this: $varName = c1; $$varName = 3; that just set $c1 to equal 3. Does that help? -Original Message- From: Julio Cuz, Jr. [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 9:56 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Variables HI-- * I

RE: [PHP-DB] Variables

2002-04-25 Thread Ryan Jameson (USA)
In an attempt to be less vague I think you want to change your line: $c . $count+1 = $artist[$count]; to be: $varName = $c.($count+1); $$varName = $artist[$count]; Got it now? --- I think what you don't know is this: $varName = c1; $$varName = 3; that just set $c1 to

[PHP-DB] Re: Search Script

2002-04-25 Thread Jennifer Downey
Thanks all, You people are awesome. I have it working but I still have 2 bugs First it is only showing the first record it finds with the search term, not all records associated with it. Second it has to be spelled exactly right or I get 0 results. in other words if Jelly is spelled Jelly and

[PHP-DB] Mssql/Sybase errors

2002-04-25 Thread Jeffrey_N_Dyke
Hello. I have recently installed the freetds package and reconfigured PHP to connect to MSSQL. I am running a simple join query on two tables and I get the following error. bWarning/b: Sybase error: 'REQ' is not a recognized OPTIMIZER LOCK HINTS option. (severity 15) in myFile.php on line

Re: [PHP-DB] Re: Search Script

2002-04-25 Thread Maureen
The if/else/echo should all be within the while loop. The way it is now, it should only show the last record returned, because that is the last value within the while loop. The way you have it, the rest would be done after it had looped through all of the records and it would return

Re: [PHP-DB] Re: Search Script

2002-04-25 Thread Jennifer Downey
I am quite positive that they are not Binary what I am finding is that it has to be exactly as it is in the table. I have one item called StarrRacing Guide if I put in starr or Starr it will return nothing I have to spell it exactly like it is in the db StarrRacing Guide. here is a dump of the

[PHP-DB] Re: Search Script

2002-04-25 Thread Manuel Lemos
Hello, Jennifer Downey wrote: Hi all, I have been trying to build a search script for my site that deals with only one table in my db. As Julie Meloni pointed out look in the MySQL manual for LIKE clauses I can't seem to locate that clause in ether manual. Dan Brunner gave me this to go

Re: [PHP-DB] Re: Search Script

2002-04-25 Thread Miles Thompson
Jennifer, Check if there is a set exact setting for MySQL. Using LIKE should find everything beginning with Starr. You may also have to convert search term and target values to one of lower or upper case in the SELECT statement. Miles At 10:55 AM 4/25/2002 -0700, Jennifer Downey wrote: I am

RE: [PHP-DB] Re: Search Script

2002-04-25 Thread Stuart Dallas
Jennifer I suggest you check out MySQLs full text indexing capabilities. If you create a fulltext index on the text fields you want to search you can use the MATCH function. This will perform a fuzzy matching search that returns results in order of relevance. For details see

[PHP-DB] Re: Search Script

2002-04-25 Thread Jennifer Downey
Ok I am looking at the code an I'm thinking it has to be in the code because I tried it on my box at home and it did the same thing. So while looking hard at the code I came up with this: if($searchword == $iname) this is the problem if $searchword == $iname then it will echo everything I want

Re: [PHP-DB] Re: Search Script

2002-04-25 Thread Maureen
Here is some more information I found in the manual about case sensitivity in searches. The whole page is at http://www.mysql.com/doc/C/a/Case_sensitivity.html Here is the text that shows what might be the problem: In older MySQL versions LIKE comparisons where done on the uppercase value

[PHP-DB] Couldn't Unsubscribe

2002-04-25 Thread Ilhan Guvener
Yes it seems off-topic but I only joined to this mail-list. So I don't have any other place to ask. I sent mail to unsubscribe me from the list but nothing happened. I'm still recieving mails from the list. What's wrong? See Dave Matthews Band live or win a signed guitar

Re: [PHP-DB] Mssql/Sybase errors

2002-04-25 Thread szii
hehehe, you recoded PHP to reconnect to MSSQL, but you forgot to redo your connection stuff. Sybase error: means that you're connecting to Sybase and not MSSQL. *wink* 'Luck -Szii - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 25, 2002

[PHP-DB] Append into another table

2002-04-25 Thread Rosen Marinov
Hi, how can I append from one table to another with same structure some selected records Thanks, Rosen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] FORM not inserting data

2002-04-25 Thread Neil
Help. Help Please, Please tell me what I am doing wrong here...I have a form to input data but it is not posting ithere is the code. It seems to work no errors but a query show no new additions to the table. $sql = INSERT INTO employees

[PHP-DB] Re: FORM not inserting data

2002-04-25 Thread Jennifer Downey
As many people have told me and I have just now got it through my thick head try either echoing the query or use $result = mysql_query($sql) or die(mysql_error()); You will find out what is being passed (or not passed) through your variables or find out what error you are getting. HTH

Re: [PHP-DB] Re: Search Script

2002-04-25 Thread Jennifer Downey
Thanks Maureen, The == was the problem. I can search with upper and lower case and only partial words. Hosting is using 3.23.45 mysql so I don't believe that was the case. Thanks again! Jennifer Maureen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Here is