Hi,
I'm not quite sure but try to play a bit with the '".$row[...]."' part.
that looks too much. leave out the "" and/or the period.
good luck
Johannes
""Mick Lloyd"" [EMAIL PROTECTED] schrieb im Newsbeitrag
Hi,
to do this you'd need to be a quite priviledged user.
in order to create users you'll need acces to the
user-table of mysql. not likely to be given to a "normal"
user. developing on your home pc, well...
you need GRANT to grant priviledges to any user.
also not likely to be given to a user.
Hi,
hte first part after WHERE is the column name of your db.
if you want to search with name as a criteria you write:
selelct name, nickname from table where name=$name;
johannes
"Naga Sean" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I had a
Hi,
well usually yuto_increment is used on ID fields.
then depending on how many rows your table has
tinyint (up to 255; 1k), smallint (up to 65535; 2k)
mediumint (up to 16777215; 3k) int (up to 4294967295, 4k).
Johannes
"Ben Cairns" [EMAIL PROTECTED] schrieb im Newsbeitrag
Hi,
just install phpMyAdmin which has a feature to
duplicate tables structure only or structure and
data.
""McShen"" [EMAIL PROTECTED] schrieb im Newsbeitrag
9aak89$ruv$[EMAIL PROTECTED]">news:9aak89$ruv$[EMAIL PROTECTED]...
how do i duplicate a table?
i tried
create table refer2 select *
Hi,
?php
$dbhost = "yourhost";
$dbuser = "youruser";
$dbpass = "yourpassword";
$dbname = "name_of_DB";
$connection = mysql_connect("$dbhost, $dbuser, $dbpass") or die ("can't
connect");
$database = myslq_select_db($dbname) or die ("can't select DB");
$result = mysql_query("SELECT * FROM
Hi,
you can't have ANY output whatsoever before adding a
header. Even whitespaces before the opening ?php-tag
are not possible. You also could turn "output_buffering"
"ON" in your php.ini. But your ISP has to have them same
setting and I don't know about disadvantages. So go
with the first
Hi,
just a theoretical question:
is it neccessary/useful/good to specify the
link_identifer for a query if I include an
ypplication file where the link is opened
in every file.
quote:
If link_identifier isn't specified, the last opened link is assumed.
If no link is open, the function tries to
Hi,
assuming you have unique passwords.
$result = mysql_query("SELECT COUNT(*) AS used FROM userTable WHERE
passowrd=$password");
$exists = mysql_fetch_object($result);
if ($exists-used) {
display error that pswd is already in use
}
If there is an entry in your DB with the password
Hi,
could it be the setting of cookie_lifetime in your php.ini?
or the coolie_path?
just two thoughts
cheers
Johannes
""Lisa Elita"" [EMAIL PROTECTED] schrieb im Newsbeitrag
004f01c0c4df$1bd0e540$69fc2bca@hadinata">news:004f01c0c4df$1bd0e540$69fc2bca@hadinata...
I tried to use cookies with
Hi,
you usually get the error if your query is wrong and
you try to call mysql_fetch_array in a while loop.
It's easier if you post the relevant lines of code but
I'd say there is something wrong with your query.
Johannes
""Klaus Haberkorn"" [EMAIL PROTECTED] schrieb im Newsbeitrag
Hi,
which part is not working? Put a "or die(mysql_error())" behind your
queries to see which one produces an error.
like this: $result = mysql_query("SELECT * FROM ships ORDER BY ship",$db)
or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
If ($result) {
$id
Hi,
i don't get that.
Examlpe: tablename: test , entry: id 001; name: John Doe
$result = mysql_query("SELECT * FROM test");
$row = mysql_fetch_whatever($result); // everything ok
$result = mysql_query("SELECT * FROM tet");
$row = mysql_fetch_wahtever($result); // Warning: Supplied arggument
Hi,
cookies are sent as header information. This means you can't send
any output (html-tag, whitespaces before ?php) at all before
sending cookie/header information.
As your error message tells you the output already started in line 4.
Move the cookie-part from line 6 to the beginning and it
Hi,
$result2 = mysql_query("SELECT * FROM convicts WHERE ship =
'$id' ORDER BY convict",$db);
$row = mysql_fetch_array($result2) // ! you are missing a ";"
this is where you get the parse error from!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe,
Hi,
check the relevant configure-flag for interbase.
most likely to be something like --with-interbase.
just type ./configure --help |more and you'll get
a lng list of options.
Johannes
[EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Quiero instalar
Hi,
you have output in line 42. any html stuff. You have to send haeder
information
before any output. If you capture the info via a form you can make a
seperate
capturing script (not $PHP_SELF) to enter the info into a DB and at the end
of this
-after successfully inserting the data- redirect
how about posting the code? or describe
the problem a bit closer.
Johannes
"Rui Machado" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello
I'm writting a registration form with connection to
mysql DB, but I have a problem in the last step, I
can't
Hi,
$test = "The session data was transferred.";
echo "Click this link: a href=\"test2.php?".SID."\"test2.php/a";
change this to a href=\"test2.php?id=$PHPSESSID\"test2.php/a";
you need to specify a variable name first behind the ?. It worked
for me on NS 4.75
Johannes
--
PHP Database
Hi,
Does anybody know a solution? I am willing to show you my httpd.conf and
php.ini if you like.
httpd.conf would be helpful. only the relevant stuff like AddTpye
application.
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Hi,
why storing the pictures in the db. just store the link to
it.
just a thought
Johannes
"Sharmad Naik" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
I wanted to know how to store and retrive images like jpeg,bmp from
database.I have a table
Hi,
let me get this right. What I understood is the following:
1. Your admin page where you enter the information of a company
2. A Page with a drop-down list where all the company names are listed.
(These names should then be linked to an information page with more
info?)
3. A page where
Hi,
This is the code that I have so far (please note, it is within a
function)... any ideas of how I can make it work?
this arouses the assumption that is doesn't work. Did you get
errors? And could you supply more information about
your database relations especially about the one of
orders
So a certain company is previously selected? And then you want to
populate the form with the info of the company?
to do this link the menu with a onChange action to a display page.
But I'm not sure if I get the layout. Could you describe it again?
Cheers
Johannes
Beckie Pack [EMAIL
You can output the passed varibles from the previous page
in an input type=hidden in the form of the following page.
Johannes
Brinzoi Constantin Aurelian [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi !
Here is the problem: I got 8 pages, shown one
Hi,
$sql4=select * from quicktimes, other_images, storyboards, where
quicktimes.spot_id, other_images.spot_id, storyboards.spot_id =
\$spot_id\ order by date_posted desc;
this should be:
...WHERE quicktimes.spot_id = '$spot_id', other_images.spot_id = '$spot_id'
storyboards.spot_id =
Hi,
you could do the random selection in MysSQL if you use it
using a query like this.
SELECT FieldWithURL FROM YourTable ORDER BY RAND() LIMIT 0,1;
This will give you a random field. If you want more fields you have to
set different values for the limit. Like LIMIT 0,5 for the first 5 row.
Message -
From: Johannes Janson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 30, 2001 6:56 PM
Subject: Re: [PHP-DB] How to randomly select data in a field. Please help
newbie.
Hi,
you could do the random selection in MysSQL if you use it
using a query like this.
Hi,
I'm trying to get MySql type of a field (as string) into a php script.
sometime the answer is easier as you think:
mysql_field_type(link_identifier);
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hi,
I have tried these if statements, but without luck:
if ($Page='') { $Page=homepage }
you use only one = So you assign or '' or null to $page.
use if ($page == ) instead.
hope it helps
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
Hi,
The following statement will not work:
$sql = select * from sometable t1, sometable t2 where t1.field1 =
t2.field2;
do you get an error? It should work.
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Hi,
How can I detect client's OS/platform with PHP? (Win, Mac, etc.)
with PHP_OS. $os = PHP_OS;
See Chapter 8 - Constants of the manual.
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
I'm not sure but couldn't it really be that this is
due to the MySQL version? PHP is just passing
a string which is then executed by MySQL. I think
I recall having no problems with aliases. I don't quite
remember which version it was but I think it was 3.23.*.
Now I am using a shareware version
Hi,
How can I pick a random row?
SELECT * FROM table ORDER BY RAND() LIMIT 0, 1;
I'm not really sure but it worked with order by rand. Check
the manual on that if it doesn't work
hope it helps
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
Hi,
$sql2 = SELECT ServiceDes FROM ServiceTypes WHERE ServiceID = $serviceid;
put single quotes around $serviceid.
$service_type = mysql_result($sql2, 1);
I might be perpetuating the spreading of rumors but I've heard and read
somewhere
that mysql_query() is supposed to be better in the
Hi,
Warning: MySQL Connection Failed: Unknown MySQL Server Host '0f2scom' (2)
in
/web/sites/139/gamie/www.game-boy-advance.f2s.com/addartikel.php on line
22
Unable toconnect to database
[...snip...]
mysql_connect(db.game-boy-advance.f2s.com,*,**) or die(Unable
toconnect to
Hi,
I normally work PHP/MySQL but now I have a customer that is adamant
about keeping their data in an Access DB.
you could work around it by using an odbc connection from Access to MySQL.
So the administration is still done via Access but actually it is a MySQL
DB.
If you're interested see
Hi,
[...]
Warning: Cannot add header information - headers already sent by (output
started at /home/thesis/public_html/registro.php:2) in
/home/thesis/public_html/registro.php on line 80
[...]
you can't have any output before calling header(). Output is any HTML or
even
whitespaces before
Hi,
[...]
Warning: fopen(logs/993700800.log,w+) - Permission denied in
/home/sites/site20/users/guide/web/counter.php on line 28
are you sure you have the rights to access the file?
Warning: Supplied argument is not a valid File-Handle resource in
Hi,
[...]
Now, if i hit enter again it will say:
Please fill out all fields to proceed.
Sorry, username is already taken, please choose another.
There seems to be a problem with the database.
So this is the problem?
[...]
Here is my code:
Hi,
hope anyone has an idea on how to fix this...
form
input type=submit name=Submit value=Submit Request
OnClick=submit.php class=button
input type=submit name=Edit value=Edit Request OnClick=edit.php
class=button
/form
you could give the form one action and then check on the following
Hi,
Dear Experts
When ever i try to run MySQL under linux it gives me following error
ERROR 2002 : can't connect to local MYSQL server through socket
'/var/lib/mysql.sock' (111)
this is with PHP isn't it? can you log in the monitor and then type SHOW
VARIABLES. A long list
will be
Hi,
I have a form and based off of this form if my user selects option a then
I
want them to be redirected to another page. If they select option B then I
want to continue with my php scrips as it does now.
Does any one have any ideas on how I can accomplish this?
use the header() function
Hi,
[...]
Any ideas?
$add_contact_sql = INSERT INTO $table_name
(ContactID, FirstName, LastName, Title, WorkPhone,
HomePhone,Mobile,EmailName,Birthday,CompanyID)
VALUES
('',
'$FirstName',
'$LastName',
'$Title',
'$WorkPhone',
'$HomePhone',
'$Mobile',
'$EmailName',
'$Birthday',
Hi,
I have a drop-down menu that has been prepopulated with an array from a
column name CompanyName. What I need to do is take the CompanyName lookup
the CompanyID in the company table and insert the CompanyID into a row in
a
table called contacts with a CompnayID column.
[...]
Is this a
Hi,
Here is a quick question. Cane the mail() function handle file
attachments?
I couldnt find anything like that on the PHP reference but maybe someone
knows out there. If not does anyone have any simple scripts that will
allow
me to do this?
I think it doesn't. Check e.g
hi,
[...]
My question is this: how can I select only those first 20 words in the
PHP code?
SELECT LEFT(YourBlobFiekd, 20) FROM YourTable;
hope it helps
Johannes
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hi,
Any ideas as to what the problem is?
What error do you get? Is the query not working?
Put a mysql_error() into your or die(The category...) to get
the exact error message. And try putting quotes around CAtID = '$value'.
print a href= . '' . display.php . '' . Return to the
print a
Hi,
I have a problem:
with a mysql_query I get the results of a table field into a list page.
Is it possible to use this result (as link) to open a new page where the
detailed results of each row are shown?
So you select one field and list it with a while-loop?
Assuming this you can make a
Hi,
$res = mysql_query (SELECT COUNT(deptid) FROM maintenance GROUP BY
deptid);
$deptcount = array(); // reset the array
while ($row = mysql_fetch_row ($res)) {
$deptcount[] = $row[0];
this should be $deptcount[] .= $row[0]; shouldn't it?
}
cheers
J
--
PHP Database Mailing List
Hi,
Micah Stevens wrote:
Nope. Anytime you set an array with no index equal to something, (i.e.
$deptcount[]) it will add another element to the end of the array.
If you use .=, that means append the data, but since you're not
specifying an element, I'm not sure what it would do. Perhaps
51 matches
Mail list logo