did it say which line does the error
"Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result
resource in"
is referring to. if it is referring to the line which contains the
function call mysql_query (),
dpirago is right, there could be some mistake in the sql statement.
r
--
Best Regards,
Shahmat Dahlan
Research and Development
SAINS
Mobile: +(60)16 882 6130
Office: +(60)82 426 733 ext 5512
--- Begin Message ---
(1)
i've been using this method for years now, maybe somebody else has a
better way to do this?
";
php codes
$i++;
}
?>
(2)
Any one can help? I´m a bit stalled
thx
regards.
--
Best Regards,
Shahmat Dahlan
Research and Development
SAINS
Mobile: (60)16 882 6130
Office: (60)82 426 733 ext 5512
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You can also run this, that is if you haven't manually removed your
mysql installation directory
c:\>mysqld --remove
,where is usually MySQL
Unnawut Leepaisalsuwanna wrote:
1.
Run Regedit or regedt32.
2.
Find the registry entry:
|HKEY_LOCAL_MACHINE/SYSTEM/CurrentContro
Correct me if I'm wrong, but if I'm not mistaken Mysql 5 will not work
in Dreamweaver.
It will only work if you have 4.x (can't remember the exact version)
Even if you have installed Mysql 4.x, u must make sure you add in
old_password at the last line of the my.cnf
If not, you can always updat
_get_cookie_params (); I don't even get any values as
for for lifetime, url and host.
Regards and thank again.
Shahmat Dahlan wrote:
In my php.ini
I've enabled session.use_cookies=1
Everytime I initialize a session, it create the session storage file
in my /tmp
At the top my scr
In my php.ini
I've enabled session.use_cookies=1
Everytime I initialize a session, it create the session storage file in
my /tmp
At the top my script, I've added session_start ();
In my test login function, this was what I did:
$_SESSION['username'] = 'abcdef';
session_set_cookie_params (time
Or you can do the one show below
M Saleh EG wrote:
lol...
print_r($_SERVER); would be enough to show you all the server array tags.
On 8/7/05, *Shahmat Dahlan* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
You can try
foreach ($_SERVER as $key => $value)
You can try
foreach ($_SERVER as $key => $value)
echo "$key => $value";
or you can check out them out in when calling phpinfo ();
RaJeSh VeNkAtA wrote:
hai ..
if u r seeing http://www.google.com/blog/myblog.php
then
$_SERVER[SERVER_NAME] would give u www.google.com
and
$_SERVE
My apologies, I got it all wrong, I simply went and used the split
function and join those strings together, and it works.
Shahmat Dahlan wrote:
Correction, my corrected code (mistake in the last line, echo
$row->data):
$sql_stmt = "SELECT id, data FROM announcements";
$query
#1
$data_stripped = implode (" ", $tmp); #2
### echo $row->data; my mistake, it should be this:
echo $data_stripped;
}
Shahmat Dahlan wrote:
I have the following table structure called announcements
- id int(6)
- data longblob
And this is what i did:
$sql_stmt = &q
I have the following table structure called announcements
- id int(6)
- data longblob
And this is what i did:
$sql_stmt = "SELECT id, data FROM announcements";
$query = mysql_query ($sql_stmt);
while ($row = mysql_fetch_object ($query)) {
echo $row->id;
$tmp = explode (" ", $row->data, 10);
both mysql_error () and mysql_errno () are suppose to "assist" you in
determining the cause of problems you may encounter with your
mysql-related coding.
it's not a question of knowing what php can tell you what's wrong, it's
what your mysql db is telling you. you should refer to the mysql error
for reply!
"Shahmat Dahlan" <[EMAIL PROTECTED]> ???
news:[EMAIL PROTECTED] ???...
I think the mysql extension was not loaded, that's why you got the
message, and it was not able to recognize the function mysql_connect.
Fatal error: Call to undefined function: mysql_connect()
h
I think the mysql extension was not loaded, that's why you got the
message, and it was not able to recognize the function mysql_connect.
Fatal error: Call to undefined function: mysql_connect()
how did you install your copy of php? compile it from source?
Laurence Lim wrote:
Hi all, im new to PHP
When I first started out with PHP, I asked the same myself the same
questions as you just did. But over the years I have concluded:
Method (1) centralizes all your form submission processes for addition,
deletion, updating purposes, which means when you want to start
debugging, you would end up
What of the sql statement? If your sql statement had mistakes in it (be
it typo, or wrongly constructed statements), it will not even execute
the if (!mysql_fetch_array($result)) { } portion of your code. You
might want to construct your error checking portion differently as
opposed to wha
The textarea tag has an option called wrap, pls read below (extracted from w3c.org)
Carriage returns and line feeds entered by the user are ignored
and one line of text is sent to the server. No automatic wrapping is done,
so the user must scroll horizontally to see lines that extend pas
I have a question,
I have this SQL statement,
$sql_stmt = "SELECT DISTINCT EXTRACT(YEAR_MONTH FROM visitdate) AS
availYearMonth FROM visitedurl;";
$result = mysql_query ($sql_stmt);
while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
echo $row["availYearMonth"];
}
By right the value that
urned it on? Do I need to recompile the Php?
I also tried "if (isset($_GET["id"])) and
found out that $id is NULL. So, there will
be an error in the SQL statement.
Zhan Xu
EECS Department
Case Western Reserve University
----- Original Message -
From: Shahmat Dahlan <[EMAIL PRO
if the statement "if (isset($id)) doesn't probably it because
register_globals has been turned off maybe?
How about "if (isset($_GET["id"]))" ?
[EMAIL PROTECTED] wrote:
Hi, Jason:
Thank you very much for your quick reply. I tried
the if (isset($id)) but it doesn't work. Any
thoughts?
By the wa
one way it to use old_password ()instead of password(), when creating
new user name, or update the password for those existing user names with
the old_password() function.
but then this will force you to use the old password() function, which
doesn't really help much...
Vinoaj Vijeyakumaar wro
hav u tried using dashes to denote which portion is the year, month, or
day ?
e.g. instead of 20030101, you'd probably want to use 2003-01-01.
Wendell Frohwein wrote:
Hello all, I have this page where I search and add up commissions in a
mysql database. I want to select commissions between a cer
I have a question of Javascript, I don't whether anyone has experience
this before, but I think some of you must have.
I have the following main form, with a field called location, in which I
had used the SELECT html tag and also at the same time, the content for
the location field is actually
yes, by adding stripslashes it will somewhat escape those quotes ('),
but when displaying the results there will not be any need to do so.
unless it is your wish to actually store the backslash into the db.
Jerry wrote:
I think you should use addslashes to store the text in the database and
the
I have a question on Javascript, if you don't mind.
Say if I have a main page, whereby I would also have a html form which
contains a button. Let's call it main document.
When I click on the button it will open a new window, which refers to
another html page. Now, let's call it child document.
No
otal = 0;
> var thisform = document.forms[0];
> for (i=0;i<=thisform.elements["field[]"].length;i++) {
> if (!isNaN(thisform.elements["field[]"].value) total +=
> thisform.elements["field[]"].value;
> }
> thisform.totalsum.value=total;
&
My question might have anything to do with PHP but I have the following
scenario:
Say I have four fields
field1 :
field2 :
field3 :
field4 :
And a total sum field, which is a total sum of the value of the
expression, totalsum = field1 + field
7;s actually JavaScript that you want, and you need
> something like this on the body of the HTML page in the window you open
>
>
>
> something like that will do it for you, take a look at the javascript
> developer's guide (from developer.netscape.com)
>
> HTH
&g
I have a question, let's say i have my main page (so called) called
"index.php".
I have also displayed a buttonin index.php, which i will used the
"onClick" event to trigger a "window.open" function to the same main
page, "index.php" (but with parameters).
so my index.php should have these cod
I have configured apache according to the readme included in the apache
source:
./configure --prefix=/usr/local/apache
And then configure php:
./configure --with-apache=../apache_1.3.22
make
make install
After that configure apache again while activating the php module:
./configure --prefix=/usr
I was trying to list out some records from a MySQL db. And since there
my search result returned to many results, I would like to divide them
into separate pages. I tried to divide results with maybe 50 to 100
lines per page with the "limit" option into my select statement. I can't
somehow figure
In this case, if there aren't any binaries for Solaris 8, how do you
compile it under Solaris 8?
--- Begin Message ---
How can you download PHP binaries for Solaris 8? Can't seem to find it
on php.net, and some other sites.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e
try this
extension_dir =
enable_dn=on
extension=e:\apps\php\extensions\php_interbase.dll
fyi, I'm running on Win NT 4, with apache 1.3.20 and php 4.06.
regards
DL Neil wrote:
> > Anyone got a clue for this piece of "bad luck"?
> > I'm on win2k pro + IIS5 +php4.0.6 cgi installation. It works
How can you download PHP binaries for Solaris 8? Can't seem to find it
on php.net, and some other sites.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [
open the text file
> 2. counter = counter +1
> 3. write update
> 3.5 print number of hits somewhere on webpage
> 4. close file...
>
> Shahmat Dahlan wrote:
> >
> > I'd like to do a counter with PHP, how do you do this? I thought maybe I
> > could either us
I'd like to do a counter with PHP, how do you do this? I thought maybe I
could either use cookie or session or session? Which should I use ?
regards and thanks is adnved
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
How about declaring some of the variables as global variables.
regards
seriousj wrote:
> Hello
> I have a query that I have placed in a function that is in a file that I
> "include" in the page to be displayed. It doesn't work. I know that the code
> works because when I place the code in the
t;,"b","c","d","e");
> $c = array();
>
> $arraysize = sizeof($a);
> for ($i=0;$i<$arraysize;$i++) {
> $c[$a[$i]] = $b[$i];
> }
> ?>
>
> / Lars
> www.ljweb.com
>
> - Original Message -
> From: "Jonat
Is there anywhere possible for me to merge two arrays into associative
arrays?
e.g.
$a=array(1,2,3,4,5);
$b=array("a","b","c","d","e")
into
$c=array(1 => "a", 2 => "b", etc... )
Thanks in advance..
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
";
>
> sometimes i can get away without splitting the string but generally i find
> it easier to do it this way ...
>
> p.s. if there are any rules i'm not aware of as to the format of strings
> including values from db's i'd be really grateful if someone could p
If this is the case, you need to check the rights that your id "jeff" has. It
should be in the mysql database under the tablename user. You have to make sure
that you have all the rights, all the priviliges equals to 'Y'. I'm not really
sure how these previiliges, but you can just set everything
$fields=array("fname","lname","dept","city","ophone","hphone","fax","email");
$sqlstmt="SELECT * FROM contacts WHERE id='$id'";
$result=mysql_query($sqlstmt);
foreach ($fields as $values) {
print "\n$fieldn\n\n \n";
}
I'm not sure how to explain this, when do the above (I have omm
Is the MySQL and Apache running on the same machine?
Jeff Oien wrote:
> I have MySQL on a new Win2000 install and can't connect to it using PHP.
> I am able to connect using the command line. I'm not sure what the next
> step is to troubleshoot. I've checked the username and password in the
> .i
You're right, no row was returned by the query when i did tried to fetch it. So
I suppose the next viable thing to do is to figure what went wrong with the
query.
Thanks
CC Zona wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] ("Shahmat Dahlan") wrote
$sqlstmt ="SELECT stock_in.id, equip.equip_type, ";
$sqlstmt.="equip.brand, equip.model, ";
$sqlstmt.="vendor.name, stock_in.po_no, ";
$sqlstmt.="stock_in.vendor_sales_no, stock_in.cust_po_no, ";
$sqlstmt.="stock_in.serial, stock_in.warranty, stock_in.date_received,
";
$sqlstmt.="stock_in.remark,
e:
> >
> > > Hi,
> > >
> > > What do you mean by updating data into multiple forms? Do you mean
> > > displaying data in multiple HTML forms?
> > >
> > > Lester
> > >
> > > At 04:53 PM 4/18/01 +0800, Shahmat Dahlan wrote:
> >
t 04:53 PM 4/18/01 +0800, Shahmat Dahlan wrote:
> >How do I update data into multiple forms?
> >
> >Thanks in advance..
> >Shahmat
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
Apologies...
Lemme rephrase my question,
How do I update data into multiple tables in MySQL (with PHP, of
course)?
Thanks in advance..
Shahmat
How do I update data into multiple forms?
Thanks in advance..
Shahmat
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [
How do I update data into multiple forms?
Thanks in advance..
Shahmat
printf("%s ", $myrow["equip_type"]); //no table name
did not work, and did not display the content
But if I apply the extract on $myrow, it worked..
extract($myrow);
printf("%s ", $equip_type);
Thanks
regards
CC Zona wrote:
> In article <[EMAIL PROTECT
I have three tables, whereby I have used a select statement to extract
some of the fields from each and one of the tables.
e.g.
$sqlstmt ="SELECT stock_in.id, equip.equip_type, equip.brand,
equip.model, vendor.name ";
$sqlstmt.="FROM stock_in,equip,vendor ";
$sqlstmt.="WHERE equip.id=equip_id and
If I were to break my codes into pieces and put them into seperate files
and call them from a single "depository" php script, how do I pass
variables from one file to another?
Thanks in advance.
Shahmat
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED
I have IIS 4 with PHP 4pl1 running on Win NT 4. I can't seem to load the
(*.dll) extensions. There seem to be something wrong with the extension
path. The browsercap.ini path is pointing to the right path. Can anyone
help?
Thanks in advance.
Shahmat
--
PHP Database Mailing List (http://www.php
That didn't quite work, I tried using single quote enclose within double
quotes and it works.
$sqlstmt="SELECT * FROM dept WHERE shortname='$shortname'";
Thanks anyway
ben wrote:
> On Tue, 20 Mar 2001, Shahmat Dahlan wrote:
>
> > I'm trying to
I've tried what you suggested and it works, thanks.
Russ Michell wrote:
> Try:
>
> $sqlstmt="SELECT * FROM dept WHERE shortname='$shortname'";
> //Include single quotes..
>
> Russ
>
> #---#
>
> "Believe nothing - consider everything"
I'm trying to use mysql_result to extract data from one particular field
in a record. So I suppose the most viable solution is to use
mysql_result. But when I do this:
$sqlstmt="SELECT * FROM dept WHERE shortname=$shortname";
$result=mysql_query($sqlstmt);
$temp=mysql_result($result,0,"shortname"
57 matches
Mail list logo