You aren't calling mysql_query() to execute the query.
//$find is text box input
$wordsarray = explode(" ",$find);
$sql = "SELECT bandname FROM bands WHERE (bandname
LIKE ";
$i = 0;
while ($i < count($wordsarray))
{
$word = current($wordsarray);
next($wordsarray);
$sql=$sql."$wor
The code you're referencing is my modification of his original post. :)
-Original Message-
From: Ben Bleything [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 8:04 PM
To: 'Matthew Loff'; 'Mark Gordon'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Dynamic SQ
, July 08, 2001 8:13 PM
To: 'Matthew Loff'; 'Mark Gordon'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Dynamic SQL + result resource error
Guess I'm just a big dumbass then, aren't I =P
Oops.
I suppose that would cause it to fail then, wouldn't it?
=> Ben
--
Everyone suggesting "Easy! Just install Mysql!" makes me laugh... :)
Jeff-- I suggest you check:
1) http://www.hotscripts.com/
2) http://www.zend.com/
3) http://www.sourceforge.com/
4) http://www.mysql.com/ (Just kidding!)
Any shopping cart that uses ODBC should work just fine-- and moreso,
Ha ha... It makes perfect sense!
I just assumed that since he was asking, he was implying that he didn't
have the ability (due to administrative reasons) to install mysql.
Good point, though. :)
-Original Message-
From: Tom Peck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 12,
What about...
SELECT WLPbib.bibID,
WLPbib.title,
WLPbib.publisher,
WLPbib.publicationDate,
WLPaddress.city,
WLPaddress.state,
WLPprofile.firstName,
WLPprofile.lastName,
WLPprofile.organization,
WLPcountry.languageName
FROM
2, 2001 10:48 AM
To: Matthew Loff
Cc: 'Dobromir Velev'; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Left Join is producing duplicate results - MySQL &
relational tables
Hi Matthew,
Matthew Loff wrote:
> What about...
> SELECT WLPbib.bibID,
>
I think he just means a hypertext anchor, that contains a string
identifying the record.
A HREF="fun.php?id=$id"
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 12, 2001 11:27 PM
To: Rankin, Randy; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Escaping &
Brad--
I see what you're trying to do. Here's how this issue with a site I
did, perhaps this will help:
Eliminate the database of images all together. Create an image that
says "No Picture Available", and save it as "/images/no_photo.jpg".
When (if) a user uploads a file, have it rename the f
I'm assuiming this means you're pulling the name from the DB and putting
it as the value of a text input, as in:
INPUT TYPE=TEXT NAME="name" VALUE="$name"
The quotes should fix that problem.
-Original Message-
From: Christopher Hebert [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July
It might help us to see exactly what the query is...
Could you insert an echo statement and let us know what SQL query it's
producing?
echo "
INSERT INTO News
(NewsDate,NewsTitle,NewsText)
VALUES
('$NowDate','$NewsTitle','$NewsText')
";
-Original Message-
From: AKA Hook
lto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 3:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PLEASE HELP! Problem with ODBC string insert
Here is the echo output.
UPDATE News SET NewsTitle = 'Text',
NewsText = 'can\'t use quotes!' WHERE NewsID = 16
"Ma
Ken--
If you have access to that server with the SQL database... Then instead
of creating an additional PHP script on the SQL server... Could you
simply add a username/password that was allowed to access that
particular database (read-only, of course) remotely?
If that isn't an option, here's
of single and
double but nothing has worked.
There HAS to be an answer out there! Do certain SQL statements just not
work in PHP / Access? Is this a bug in Access or PHP?
If I can't get this to work then I won't be able to use PHP for this
site! Someone please shed some light on t
-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 1:40 AM
To: Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] relay response transactions between PHP scripts on
different servers
Here's the part that confuses me:
How does MovieResponder.php on your sit
The "body" of the response is the data that the
http://www.site.com/MovieResponder.php script would produce.
The fread() call that I meantioned before would read -all- of this data
into a variable.
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 1
d, your $data variable would contain:
Movie One 1977
Movie Two 1977
Movie Three 1977
Easy as that! It's a very simple concept.
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 4:04 PM
To: Matthew Loff; 'PHP DB Mailing List'
Subject
?>
The $page variable will contain the output of http://snaps.php.net/.
Good luck!
--Matt
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 4:50 PM
To: Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] the body of the re
et
started with PHP-- I'm sure others on the list could make some great
recommendations.
--Matt
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 5:17 PM
To: Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] the body of the
"are you saying that i can grab the output of your echo() statements in
YOUR PHP script by Fopen()ing your URL in MY script and then Fread()ing
that resulting file pointer?"
--Yes! That's -exactly- what I've been trying to explain. :)
That's the -best- way I can think of retrieving the info fr
The mysql_connect() function accepts a host name, which can be the
internet address of another machine! However-- the MySQL database on
that machine has to be set up to allow outside connections for whatever
particular username/password you are using!
Please see these pages to answer your ques
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 6:56 PM
To: Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] remote database exchange
Suppose I Need to get Vendor prices from a very large remote (Oracle)
price list . They probably don't have PHP insta
I am not familiar with Oracle, but by looking through the PHP docs, it
appears that you can't connect remotely to an Oracle server...
Am I wrong about this, or is it a limitation of the Oracle library, or
is Oracle not built to allow remote connections?
-Original Message-
From: CC Zon
Even if a PHP host doesn't have all the DBMS extensions you need, you
could compile them and load them yourself with dl()
http://www.php.net/manual/en/function.dl.php
I thought you might want to keep that in mind, in case one particular
host has a great price but not all the features you need..
ed in:
if(!extension_loaded("mysql")) dl("mysql.so");
That's assuming that the mysql ext. is named "mysql.so" in a compiled
state, of course.
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 9:26 PM
To: Matthew Loff;
ng those shared modules is another story-- I'm not quite sure
how to. Can anyone else help?
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 10:18 PM
To: Ken Sommers; Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] php/mysql
om: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 11:45 PM
To: Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
support>?
thanks Mat,
I found this FAQ:
When I try to connect to mysql from php I get this er
dl("mysql.so"); won't compile it... You need to provide the "mysql.so"
file for it to link to, but I don't know where to obtain it... :(
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 12:12 AM
To: Matt
brary (e.g. mysql.so) that you need... I'd check for .rpm
files...
-Original Message-
From: Ken Sommers [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 12:43 AM
To: Matthew Loff; 'PHP DB Mailing List'
Subject: Re: [PHP-DB] php/mysql/unix-Linux hosting with major DBMS
suppor
In Oracle, the syntax for a theta-style join (the one you're describing)
is:
SELECT ...
FROM ...
WHERE item1 (+) = item2
However, MySQL doesn't support this syntax. The only way to do left
(outer) joins in mysql is the way you described:
SELECT ...
FROM ...
LEFT JOIN ... ON ... = ...
-O
Certainly not in the PHP manual, and LIKE isn't really covered in the
MySQL manual either...
Here's a good page with an intro to SQL queries:
http://developer.ecorp.net/sqltut.htm
--Matt
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2
Good call, Paul...
I checked through the manual briefly to see if LIKE was in there, I
guess I missed that page.
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 5:08 PM
To: Matthew Loff; [EMAIL PROTECTED]; 'PHP DataBase-List
I'm not sure if this will solve it or not, but I found 2 problems...
1) You're using 1 equals sign
2) You're comparing a integer to a string
Try this...
If ((int)$row["home_score"] == 255)
run code to output a db entry form
-Original Message-
From: Aaron Vegh [mailto:[EMAIL PRO
strftime("format", strtotime($database_time_string));
"format" is defined in the page for strftime(). strtotime() converts
the MySQL date into a UNIX timestamp.
-Original Message-
From: Caleb Walker [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 18, 2001 4:06 PM
To: [EMAIL PROTECT
This has been covered countless times on the list... :)
http://www.php.net/manual/en/function.mysql-insert-id.php
-Original Message-
From: Grant Boggs [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 7:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Getting key of row just i
You'll have to take care of the recursive directory walking function...
Here's code I found to get the ID3 tag from an MP3 file:
http://px.sklar.com/code.html?code_id=429
--Matt
-Original Message-
From: pjc [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 17, 2001 12:13 AM
To: [EMA
PostgreSQL does row-level locking... But I'm more familiar with MySQL,
as I presume you are...
If you want to rely on MySQL's table locking, but are worried about a
user aborting the script, see:
http://www.php.net/manual/en/ref.misc.php
A combination of ignore_user_abort() and connection_abor
There should -not- be a semicolon at the end of the SQL query when using
mysql_query() through PHP...
http://www.php.net/manual/en/function.mysql-query.php
The problem lies elsewhere.
-Original Message-
From: Vera Algoet [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 17, 2001 1:
ASP list members will tell you ASP is better/easier for this, PHP list
members will tell you PHP is better/easier for this.
You're asking a pretty loaded question...
I, personally, believe that PHP is much better/easier, but I learned PHP
coming from a C/C++ background.. If you have done progr
: Matthew Loff [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 10:11 PM
To: 'Radith'; '[EMAIL PROTECTED]'
Subject: RE: [PHP-DB] Newbie But Urgent
ASP list members will tell you ASP is better/easier for this, PHP list
members will tell you PHP is better/easier for th
Without spaces, the URL won't line break...
I recommend one of two things...
1) Use a for() or while() loop with substr(), to print out, say, 50
characters per line, then break to the next line, until reaching the end
of the string...
2) Use an ellipsis ("...") to cut out the middle of the URL
If you use the at symbol to supress the error message from being
printed, the if() statement will still recognize an error has
occurred... So, try this:
if (@mail($email,$subject_confirm_account, $message_confirm_account,
$from_confirm_account)) {
HEADER("Location:index.php?fuseaction=t
You are overwriting the first row.
$result = mysql_query("SELECT clubac.id AS clubacid, clubac.club_id,
clubac.ac_year, clubac.ac_type, club.id
FROM clubac, club WHERE club.id = '$club_id' AND clubac.club_id =
club.id");
if(mysql_num_rows())
while ($row = mysql_fetch_array($result)
...lol
is there any to write columns first but still call fields with headers?
as writing in a table would not allow keeping tags open
ie.
echo"col[1]";
echo"col[2]";
array_flip do the job?
but how?
Sean
Matthew Loff <[EMAIL PROTECTED]> wrote in message
005c0
You have the wrong list.
http://www.mysql.com/documentation/lists.html
-Original Message-
From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 2:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Restarting A LOT
Okay, this is beginning to bug. I have
If you run a local DNS server, and have all computers in the school use
it as their DNS server (which is likely the scenerio) then you can
create local TLDs (top-level domains) as you please, as far as I know.
If you're running a local UNIX server, take a look at the BIND
documentation. If you
You can system()/exec()/passthru() and run rundll32 on the library,
can't you?
-Original Message-
From: James Moore [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 12:34 PM
To: Alain Samoun; GRI
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
S
Robert--
You're on the right track... I'm assuming $row is the result of a
mysql_fetch_assoc() call, and $row['item'] contains the hashed value
(either "m_r", "m_c", or whatever)... Try this:
m_r, 'Mens Charm' => m_c, 'Womens
Ring' => w_r,'Womens Charm' => w_c);
#query db and get a result
48 matches
Mail list logo