try using the rand function..
eg...
$rand=rand(1,10);
input type='text' name='id$rand'
but that migth get a same number more then once... my suggestion is this
$checkboxid=1;
// Start of the loop
echo input type='text' name='id$checkboxid';
// end of loop
$checkboxid = $checkboxid + 1;
that
Hiya, I'm writing a backend in MySQL with a PHP frontend. One of the PHP
pages searches the database. The user can enter as many or as few fields as
they like. I then search the database using this code:
$result = mysql_query(select * from equipment where (category='$category')
and (description
Hi, I really hope someone can help me with this.
I'm new to PHP; just got started late last year.
I've put together a MySQL/Apache/PHP system to manage contacts. It's all
running locally on my Win2k system.
I have installed phpmyadmin also, and I used that utility to populate my tables.
So
if (empty($var)) {
}
else
{
}
--
Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com
Gary Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hiya, I'm writing a backend in MySQL with a PHP
$result = mysql_query(select * from equipment where (category='$category')
and (description like '%$description') and (roomloc='$roomloc') and
(quantity like '%$quantity') and (serialno like '%$serialno') and (patdue
like '%$patdue'),$db);
Gary Smith wrote:
Hiya, I'm writing a backend in
You could setup an autoincremented unique integer field in your db
table(s), then when you fetch the row from the table use the id in
generating your checkbox name.
-ib
Chris Payne wrote:
Hi there everyone,
I have a loop which goes through my MySQL database and some PHP code which grabs
Hi,
I'm trying to do a sort of address book where I'd put all information about
anybody or any company from which I receive informtation (friend, people
from work, hotels, places...)
An entry starts with a name, then I can have any type of information. The
table I'm using has a lot of fields,
Use input type=checkbox name=id[? echo $id ?]
Then you'll have an array of the boxes checked with
the id as the array key.
olinux
--- Neil Thomson [EMAIL PROTECTED] wrote:
try using the rand function..
eg...
$rand=rand(1,10);
input type='text' name='id$rand'
but that migth get a same
look at http://www.webmasterbase.com/article/228
--
Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com
Sg [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
I'm trying to do a sort of
It would help if we could see the actual query. It sounds like the problem
is a syntax error in the query itself.
At 11:52 AM 1/6/2002, Gurhan Ozen wrote:
Hi everyone,
I have a problem with mysql connectivety which is making me nuts. If the
query is select blah, blah from table (i.e.
I am pretty sure that the query is correct. here is the actual query:
$query=select distinct(nodeid), nodename from books where
bookid=$bookid;
$result=mysql_query($query);
$num_results=mysql_num_rows($result);
I have loaded a book into the
Hm, if the result you want is the number of distinct nodeid values, why not
use a query like this:
select count(distinct(nodeid)) as nodecount from books where bookid =
$bookid;
Then the number of nodeid's is stored in nodecount.
You might also want to look into the GROUP BY clause. That
hmm that's an idea... I stil don't get why mysql_num_rows wouldn't work with
WHERE clause but i will try to do a workaround with what you said below.
Although it will be a little extra coding I guess I don't have any other
choice:)
Thank you very much for your help:)
Gurhan
-Original
Gurhan,
The first rule with all of these problems is to insert error-checking statements.
There are two types: firstly
the MySQL function set includes error number and error (msg) text facilities; and
secondly the addition of
'debug' echo statements, eg to be absolutely sure what $query looks
This is probably not what you want but I found at
http://www.php.net/manual/en/install.configure.php something like that:
--with-ibm-db2[=DIR]
Include IBM DB2 support. DIR is the DB2 base install directory, defaults to
/home/db2inst1/sqllib.
Maybe you can make use of it, I don't run IBM DB2.
Thanks Rich,
I am unclear how to merge the login to the preferences. Check out my code
for my login. Right below it is the login2.php,login_done.html,admin.php
where will I merge the user preferences portion within this script..
Thanks for all your help..
Here is the test url -
Hi
I have three tables set out below:
xp_artist: artist_id , artist _name
xp_sings: artist_id , songs_id
xp_songs: songs_id , song_name , lyrics
I can not figure out how to query and return the results for a query like:
select song_name FROM xp_artist,xp_sings,xp_songs WHERE
You seem to be doing it fine as far as I can see, except for song_id which should be
songs_id in the query...
Bogdan
Barry Rumsey wrote:
Hi
I have three tables set out below:
xp_artist: artist_id , artist _name
xp_sings: artist_id , songs_id
xp_songs: songs_id , song_name , lyrics
I
I did not see that ( I must be blind hehe ). One other question , I have the
lyrics also stored in the database, how can I create a link so that when the
query is returned they can click on song name and the lyrics will be viewed?
- Original Message -
From: Bogdan Stancescu [EMAIL
Your query looks fine, except that it should be xp_sings.songs_id. What you
are trying to resolve is a many to many relationship where many artists can
sing the same song, hence you have created the table xp_sings. This is also
known as a pivot table.
What problem are you having?
Have you
Barry,
Execute your query, fetching song_id as well as song_name, returning the
result handle to $result (or any name you're comfortable with) and present
your song titles like so ..
while ($myrow = mysql_fetch_array($result))
{
printf(a href=\%s?songs_id=%s\%s /a \n, $LYRIC_URL,
Hi all,
I'm a newbie to PHP and mySQL and I'm currently running PHP+mySQL on my
Linux 2.2.16 kernel. Every time I try to connect to mySQL from a php page, I
get this error message:
ERROR 2002: Can't connect to local MySQL server through socket
'/var/lib/mysql/mys
ql.sock' (111)
What does that
Is mysqld running?
Username?
Password?
At 08:30 PM 1/6/2002 -0500, Vu Hoang Huynh wrote:
Hi all,
I'm a newbie to PHP and mySQL and I'm currently running PHP+mySQL on my
Linux 2.2.16 kernel. Every time I try to connect to mySQL from a php page, I
get this error message:
ERROR 2002: Can't
Yes, mysqld was running.
Username and password were provided
via this function call
$db = mysql_connect(localhost,username,password);
I have to same problem when trying to connect to mysql
server whenever I use any user other than root. So basically whenever I try
to run mysql using root account
Dear List,
I was installed mysql-3.23.47 in my Linux box with PHP. I could shown
version correctly with mysql command line or any windows client tools. It
still shown in phpinfo with version 3.23.37 (old version before
upgrade). What wrong?
Did somone know about Zend
Just echo a link of the form a href=\lyrics.php?song_id=$song_id\Click for
lyrics/a and use the incoming song_id in lyrics.php to get it from the
database.
Bogdan
Barry Rumsey wrote:
I did not see that ( I must be blind hehe ). One other question , I have the
lyrics also stored in the
I'm new to PHP, and I have a question regarding the storage of connection
properties to the database. I have a site on a shared (Unix) server. I'm
adding some PHP to a section which will be database-driven. I'm concerned
about storing the username and password to my database (some of the data
Hi All
I think i saw a php script somewhere on my web travels, that allows you to
include
sub domain reg to your web site.
it allowed you to offer
http://yourname.choiceofdomainname.com
so the visitor can have thier name in front of a domain name reged to our
webspace.
If i remeber right, it
*being a smart-ass from your email signature*
sure... you can download the script from ..
just kidding :)
the best way to do this as far as I know would be to have a PHP script which
had write-access to your apache conf files, which then just added in the
required lines and restarted
Hello,
Dave Carrera wrote:
Hi All
I think i saw a php script somewhere on my web travels, that allows you to
include
sub domain reg to your web site.
it allowed you to offer
http://yourname.choiceofdomainname.com
so the visitor can have thier name in front of a domain name reged
30 matches
Mail list logo