Re: [PHP-DB] boolean instead of array

2002-11-03 Thread John Coder
On Sun, 2002-11-03 at 01:44, Jason Wong wrote: On Sunday 03 November 2002 10:23, John Coder wrote: I seem to somehow get an boolean instead of an array from a mysql_fetch_row function and I have no idea how. Here's the code; Try adding some error checking into your code (see manual

RE: [PHP-DB] boolean instead of array

2002-11-03 Thread Josh Johnson
It's hard to tell which output is from which loop, you might be getting confused (if anything, you might be confusing anyone that might help)... the Boolean was probabally due to a bad result, for whatever reason (maybe your connect code was wrong? I'm not sure but I think you get a valid

[PHP-DB] security check

2002-11-03 Thread Seabird
Hi everyone, on my site I created a login which is supposed to be secure. I'm not familiar with how to surpass signups, but was wondering if people can see if they can get my page to view without signing up. The page that is supposed to be secured is the about me index. (the rest is still open).

[PHP-DB] Generating readio buttons

2002-11-03 Thread David Jackson
Howdy -- How do I dynamically generate the value for radio buttons off the DB (MySQL) backend? Here's some code that almost works TIA, David - Almost works ?php $header = mysql_query (SELECT * FROM chart ORDER BY acct ); if ($row =

Re: [PHP-DB] LIKE statement

2002-11-03 Thread Peter Beckman
change your query to this: select count(distinct itemid) from business where name like 'word1 word2 word3%' or description like 'word1 word2 word3%'; Peter On 4 Nov 2002, Chris Barnes wrote: Hi, I've got a dilly of a problem. I'm probably doing something wrong but I don't know what. I'm

Re: [PHP-DB] Generating readio buttons

2002-11-03 Thread Peter Beckman
Gonna need some additional information, such as: 1. The first three rows your query returns 2. The expected output 3. The actual problem and/or error. Peter On Sun, 3 Nov 2002, David Jackson wrote: Howdy -- How do I dynamically generate the value for radio buttons off the DB (MySQL)

[PHP-DB] Re: LIKE statement

2002-11-03 Thread David Jackson
Chris Barnes wrote: Hi, I've got a dilly of a problem. I'm probably doing something wrong but I don't know what. I'm trying to use the LIKE statement in a query where more than one word is used in with LIKE..e.g. select count(distinct itemid) from business where name or description like 'word1

Re: [PHP-DB] Generating readio buttons

2002-11-03 Thread David Jackson
Peter Beckman wrote: Peter, Thanks for your prompt reply. Gonna need some additional information, such as: 1. The first three rows your query returns 2. The expected output 3. The actual problem and/or error. What I'm trying todo is build a radio box form for the selection of ledger

Re: [PHP-DB] boolean instead of array

2002-11-03 Thread Jason Wong
On Sunday 03 November 2002 20:58, John Coder wrote: Try adding some error checking into your code (see manual examples) and using mysql_error() to find out what's going. What error checking to insert into this code I'm clueless. I found out Again, have a look at the examples in the manual

Re: [PHP-DB] mysql_connect problem rh7.3

2002-11-03 Thread Wouter
Thanks! I was able to get native mysql support by adding extension=mysql.so to php.ini. So now mysql_connect() works John Coder wrote: While Micah is correct, you do have mysql support on php but as a dbs not the built in php fuctions. Therefore you must use the dbx functions instead.

Re: [PHP-DB] Generating readio buttons

2002-11-03 Thread Peter Beckman
Here's your problem: acct[] doesn't equal anything. $acct[4] might. So: echo input type='radio' name='gl_acct' value='{$acct[4]}'; might give you want you want. The name='acct[]' is used for PHP form processing, putting the correct value in the variable. For example, $acct[Yes] might be set

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread Amit_Wadhwa
if you want to search for multiple words, u have to use multiple like operators: select count(distinct itemid) from business where name like 'word1' or name like 'word2' or name like 'word3'; or the IN statement with wildcards: select count(distinct itemid) from business where name IN

[PHP-DB] PHP Case Sensitivity

2002-11-03 Thread Graeme McLaren
Hey all, I've had a bizarre experience. When I uploaded a php script it worked fine and when I was looking through my code I found that it shouldn't have worked because two variables had been used instead of one. What I'm meaning is, I used $Year and $year where I was just supposed to use $Year,

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread Chris Barnes
Yeah I really need to search for multiple words. Can anyone confirm if the IN statement will work for me in this situation? On Mon, 2002-11-04 at 09:31, [EMAIL PROTECTED] wrote: if you want to search for multiple words, u have to use multiple like operators: select count(distinct itemid) from

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread John W. Holmes
You can't use wildcards with IN, only with LIKE or regular expressions. ---John Holmes... -Original Message- From: [EMAIL PROTECTED] [mailto:Amit_Wadhwa;Dell.com] Sent: Sunday, November 03, 2002 5:31 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] LIKE statement or IN statement?

Re: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread David Jackson
Chris Barnes wrote: Yeah I really need to search for multiple words. Can anyone confirm if the IN statement will work for me in this situation? Chris -- Why not just try it you self and let's us know. Also check to MySQL doc at http://mysql.org David On Mon, 2002-11-04 at 09:31, [EMAIL

Re: [PHP-DB] Generating readio buttons

2002-11-03 Thread David Jackson
Peter Beckman wrote: Here's your problem: acct[] doesn't equal anything. $acct[4] might. So: echo input type='radio' name='gl_acct' value='{$acct[4]}'; Peter -- Thanks again for you help. I wonder if it's not a quoting issue on my part? How would I use the $row[column_name], in the above

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread Amit_Wadhwa
ok so you would have to use : --select count(distinct itemid) from business where name like 'word1' or name like 'word2' or name like 'word3'; no other go. .. You can't use wildcards with IN, only with LIKE or regular

Re: [PHP-DB] boolean instead of array

2002-11-03 Thread John Coder
On Sun, 2002-11-03 at 15:01, Jason Wong wrote: On Sunday 03 November 2002 20:58, John Coder wrote: Try adding some error checking into your code (see manual examples) and using mysql_error() to find out what's going. What error checking to insert into this code I'm clueless. I found out

RE: [PHP-DB] LIKE statement or IN statement?

2002-11-03 Thread John W. Holmes
ok so you would have to use : --select count(distinct itemid) from business where name like 'word1' or name like 'word2' or name like 'word3'; no other go. If you're not going to use wildcards, then you can use IN. The whole idea of using LIKE is that you can use _ and % as wildcards when

[PHP-DB] Getting affected rows before executing query?

2002-11-03 Thread Leif K-Brooks
I keep forgetting where clauses. It's my dumbest mistake, and I always make it. I just lost the password of everyone on my site trying to change my own - not good. Anyway, I'm trying to edit PhpMyAdmin to warn if there's more than a certain number of affected rows for a query. Is there a

[PHP-DB] error messages to variables

2002-11-03 Thread Bob Lockie
You can suppress the error message on failure by prepending a http://www.php.net/manual/en/language.operators.errorcontrol.php to the function name.. How can you get the error string into a local variable? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Connecting to DB on separate server?

2002-11-03 Thread Cassy M Rowe
I have a php page on server #1 trying to access a database on server #2. What do I put in the following blanks: $hostname: ___ (have tried IP, http, localhost, nothing works) $username: blah $password: blah $database: _ $link=mysql_connect($hostname, $user, $pass) or

Re: [PHP-DB] Connecting to DB on separate server?

2002-11-03 Thread Bob Lockie
Cassy M Rowe wrote: I have a php page on server #1 trying to access a database on server #2. What do I put in the following blanks: $hostname: ___ (have tried IP, http, localhost, nothing works) $username: blah $password: blah $database: _ $link=mysql_connect($hostname,

[PHP-DB] Re: Generating readio buttons

2002-11-03 Thread David Jackson
OK, this works but there has to be a pretty way? David - Works - html headtitleOperation Sticky Bun/title/head body h3 align=centerOperation Sticky Bun /h3 ?php require('connect.php'); ? ?php print 'form action=hello.php method=post'; $header = mysql_query

[PHP-DB] Check If Table Exists

2002-11-03 Thread Tony72284
How do I check to see if a table exists?

Re: [PHP-DB] error messages to variables

2002-11-03 Thread Jason Wong
On Monday 04 November 2002 12:10, Bob Lockie wrote: You can suppress the error message on failure by prepending a http://www.php.net/manual/en/language.operators.errorcontrol.php to the function name.. How can you get the error string into a local variable? Look at the track_errors setting

Re: [PHP-DB] Check If Table Exists

2002-11-03 Thread Tony72284
RTFM?

Re: [PHP-DB] Getting affected rows before executing query?

2002-11-03 Thread Jason Wong
On Monday 04 November 2002 10:47, Leif K-Brooks wrote: I keep forgetting where clauses. It's my dumbest mistake, and I always make it. I just lost the password of everyone on my site trying to change my own - not good. Anyway, I'm trying to edit PhpMyAdmin to warn if there's more than a

Re: [PHP-DB] PHP Case Sensitivity

2002-11-03 Thread Jason Wong
On Monday 04 November 2002 07:25, Graeme McLaren wrote: Hey all, I've had a bizarre experience. When I uploaded a php script it worked fine and when I was looking through my code I found that it shouldn't have worked because two variables had been used instead of one. What I'm meaning is, I