On 26 July 2010 15:38, Bavithra R bavithr...@gmail.com wrote:
hi friends..
Is there any equivalent statement in php for scanf or cin in c or c++?
That is without using html and creating forms.
WOW. Completely surprised by the two responses that were given.
?php
while ($userinfo =
hi friends..
Is there any equivalent statement in php for scanf or cin in c or c++?
That is without using html and creating forms.
Thanks in advance
regards
--Bavithra.R
hi friends..
Is there any equivalent statement in php for scanf or cin in c or c++?
That is without using html and creating forms.
Thanks in advance
regards
--Bavithra.R
No, there are no equivalents in PHP.
__ Information from ESET Smart Security, version of virus signature
-Original Message-
From: Bavithra R [mailto:bavithr...@gmail.com]
Sent: Monday, July 26, 2010 7:39 AM
To: php-db@lists.php.net
Subject: [PHP-DB] input statement in php
hi friends..
Is there any equivalent statement in php for scanf or
cin in c or c++?
That is without
Hello everyone, I have a problem.
I use the following to *try* and insert data into my MySQL database...
//Variables come from a form
$username= $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
//Connect to the database
$connect = mysqli_connect($hostname,
Remove the quotes around the variables in all your statements.
For example, this statement:
mysqli_stmt_bind_param($submitadmin, isss, '$numrows', '$admin',
sha1('$password'), '$email');
could be rewritten as:
mysqli_stmt_bind_param($submitadmin, isss, $numrows, $admin,
sha1($password), $email);
That worked, thanks!
Remove the quotes around the variables in all your statements.
For example, this statement:
mysqli_stmt_bind_param($submitadmin, isss, '$numrows', '$admin',
sha1('$password'), '$email');
could be rewritten as:
mysqli_stmt_bind_param($submitadmin, isss, $numrows,
kesavan trichy rengarajan wrote:
could be rewritten as:
mysqli_stmt_bind_param($submitadmin, isss, $numrows, $admin,
sha1($password), $email);
Turning on E_STRICT in PHP 5.3 will show
PHP Strict Standards: Only variables should be passed by reference
This is also true in earlier
Done. Thanks for letting me know about that.
kesavan trichy rengarajan wrote:
could be rewritten as:
mysqli_stmt_bind_param($submitadmin, isss, $numrows, $admin,
sha1($password), $email);
Turning on E_STRICT in PHP 5.3 will show
PHP Strict Standards: Only variables should be
Hi i wanna ask a question. I am trying to create an image on fly, please do
help me , following is the code.
*File Name : Font.php
Code: *
html
head
titleImage Creation/title
script language=javascript
var xmlhttp;
function showPic()
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
{
I am looking for some advice on how to achieve something and so far have
been unable to do what I am looking to do.
Here is the query I am using:
mysql SELECT *
- FROM `orders`
- WHERE `ordernum` LIKE 35132
- OR `price` LIKE 35132
- OR `partnum` LIKE 35132
- OR `vendor` LIKE
Bryan wrote:
SELECT * FROM productgroup WHERE groupid = $productid
AND label = 'Cats' ORDER BY title
SELECT * FROM productgroup WHERE groupid = $productid
AND label != 'Cats' ORDER BY label,title
I'd like to find a way to combine these 2 statements. I want to list out
all the products,
Try this:
SELECT * FROM productgroup WHERE groupid = $productid
ORDER BY label = 'Cats' DESC, title
The test SQL I did to make sure I understood it was this (against our Users
table):
select * from users order by first = 'Bob' DESC, first, last
It put all the Bobs first, sorting them by
I think there's one small piece of data I left out. I'm working with
php/mssql, no mysql. I'll move to mysql when I get everything else
built. Mssql 2000 doesn't seem to like the = sign in the order by
clause. It looks like both of you so far have come up with the same
syntax though so it must
I think there's one small piece of data I left out. I'm working with
php/mssql, not mysql. I'll move to mysql when I get everything else
built. Mssql 2000 doesn't seem to like the = sign in the order by
clause. It looks like both of you so far have come up with the same
syntax though so it
Hello Everyone,
Got another simple problem here
I am trying to do a if statement inside a while (mysql_fetch_array)
Here is my code:
if ($link = mysql_tech_array($links)) {
do {
if ($_GET['page'] = $link[file]) {
$status = 'reg_button.php';
} else {
$status = 'push_button.php';
}
Matthew Ferry wrote:
Hello Everyone,
Got another simple problem here
I am trying to do a if statement inside a while (mysql_fetch_array)
Here is my code:
if ($link = mysql_tech_array($links)) {
do {
if ($_GET['page'] = $link[file]) {
You're assigning $_GET['page'] to whatever is
Thanks Chris...
added the extra =
and its working fine...
Have a nice day everyone
Matt
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Matthew Ferry [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Tuesday, February 13, 2007 11:53 PM
Subject: Re: [PHP-DB] IF statement
Am Do, den 14.07.2005 schrieb Marco Bascietto um 13:15:
It looks like there is a problem with mysqli PS when the client and the
server share the same machine.
Does anyone have a clue on what is going on or point me to some tests I
can do?
There is no problem when running client and
Hello list,
The following example script uses prepared statements to bind input and
output parameters It works flowlessy using php 5 mysqli on a client
machine and MySQL 5.0.7 beta on the server (192.168.0.2):
1: ?php
2: $m = new mysqli('192.168.0.2', 'xxx', 'xxx');
3: $m-select_db('xxx');
4:
Hi There,
I am trying to write an if statement to see if an array has any values
in it and if it does do something.
for example:
$ticklist2 = array('$values)
if (array_values(empty($ticklist2))){
do something
} else {
do something else
}
I just can't get this to work. Any help would be
Craig Hoffman wrote:
Hi There,
I am trying to write an if statement to see if an array has any values
in it and if it does do something.
for example:
$ticklist2 = array('$values)
if (array_values(empty($ticklist2))){
empty() is used to check whether a var isset
and is not null, or false -
i may be wrong but as i understand that you want to check whether a
array holds any value or not -- for this u can use COUNT function of
array which will count the values of the array.
with best wishes
balwant
On Sat, 2005-01-29 at 06:29, Craig Hoffman wrote:
Hi There,
I am trying to write
PHPDiscuss - PHP Newsgroups and mailing lists wrote:
Hello everybody,
I'm building a small application and I have trouble passing a POST
variable form one page to another inside the SQL statement.
The query displayed below works great without the
.$_POST['CompanyName'].
$query_company_listing =
: [EMAIL PROTECTED] (PHPDiscuss - PHP Newsgroups and mailing
lists)
To: php-db@lists.php.net
Subject: [PHP-DB] SQL statement syntaxis
Date: 6 Jan 2005 19:12:16 -
Hello everybody,
I'm building a small application and I have trouble passing a POST
variable form one page to another inside the SQL
Jason,
can you please turn off the return receipts on emails you send to the list.
it's bloody annoying to have 'The Sender wishes to be notified'
popup messages everytime I read one of your emails (and, alas, I don't
have the skill to hack the return receipt crap right out of Tbird). BTW
Hi,
To stop the return receipt dialog appearing in Tbird...
Tools... Options... Advanced... Return Receipt and select Never send a
return receipt. Or you can choose some of the other selections.
graeme
Jochem Maas wrote:
Jason,
can you please turn off the return receipts on emails you send to
Hello everybody,
I'm building a small application and I have trouble passing a POST
variable form one page to another inside the SQL statement.
The query (displayed below) works great without the
.$_POST['CompanyName'].
$query_company_listing = SELECT CompanyID, CompanyName,
Hello everybody,
I'm building a small application and I have trouble passing a POST
variable form one page to another inside the SQL statement.
The query (displayed below) works great without the
.$_POST['CompanyName'].
$query_company_listing = SELECT CompanyID, CompanyName,
Hello everybody,
I'm building a small application and I have trouble passing a POST
variable form one page to another inside the SQL statement.
The query displayed below works great without the
.$_POST['CompanyName'].
$query_company_listing = SELECT CompanyID, CompanyName,
CompanyOrDepartment,
@lists.php.net
Subject: [PHP-DB] SQL statement
Hello everybody,
I'm building a small application and I have trouble passing a POST
variable form one page to another inside the SQL statement.
The query displayed below works great without the
.$_POST['CompanyName'].
$query_company_listing = SELECT
Uhmmm.. how effective is a brute force attack where you can
only try one
combination per second? It's going to take you a while to get through
that dictionary.
How determined are you ;-)
Our product has a brute force attacker in it, and for some protocols, we
have to wait a few seconds
I like this idea of longer sleeps for each fail in theory,
but it becomes moot if you only allow 3 failed attempts.
-Original Message-
From: Tim Van Wassenhove [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 3:37 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Wait Statement
Well, everyone is in big discussion about this, so i figure i'll toss in
my worthless 2 cents.
Say your users have a password of like 8 characters, Brutus (used
for brute forcing) will tell someone trying to gain access that they'll
have better luck asking the person.
So the only real threat
Hi all,
I would like to add a line of code in PHP that will execute a wait before
executing the next set of code. How do i do that ?
Regards,
GM
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sleep( nb of seconds ) ;
_
- Original Message -
From: ..: GamCo :.. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 9:44 AM
Subject: [PHP-DB] Wait Statement... ?
Hi all,
I would like to add a line of code in PHP that will execute a wait
hhhmmm...
ok, i added the sleep() function in my page. what i'm basically doing is :-
i have a .php page where people log-in from. from there i send the form to
another .php page that actually checks the login and registers a session
with the username and password as session variables. then on
On Tuesday 20 July 2004 16:56, ..: GamCo :.. wrote:
ok, i added the sleep() function in my page. what i'm basically doing is :-
i have a .php page where people log-in from. from there i send the form to
another .php page that actually checks the login and registers a session
with the
..: GamCo :.. wrote:
ok, i added the sleep() function in my page. what i'm basically doing is :-
i have a .php page where people log-in from. from there i send the form to
another .php page that actually checks the login and registers a session
with the username and password as session variables.
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 7:10 AM
To: ..: GamCo :..
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Wait Statement... ?
..: GamCo :.. wrote:
ok, i added the sleep() function in my page. what i'm
basically doing is :-
i have a .php page where people log
Daevid Vincent wrote:
Similarly, I could adjust my brute force attack to sleep() a pre-determined
amount of time too ;-)
Uhmmm.. how effective is a brute force attack where you can only try one
combination per second? It's going to take you a while to get through
that dictionary.
The whole
PROTECTED]; 'John W. Holmes'
[EMAIL PROTECTED]
Sent: Tuesday, July 20, 2004 9:47 PM
Subject: RE: [PHP-DB] Wait Statement... ?
Similarly, I could adjust my brute force attack to sleep() a
pre-determined
amount of time too ;-)
The whole 'sleep()' idea just seems silly. I agree with Jason. Just
validate
Hello John,
sleep() is the brute deffense of the brute force attack...
You can make a script that opens simultaneous attacks
JWH I'm not saying using sleep is the solution to security problems, but
JWH it can be one layer of your defense.
--
Best regards,
Pablo
--
PHP Database
In article [EMAIL PROTECTED], John W. Holmes wrote:
Daevid Vincent wrote:
Similarly, I could adjust my brute force attack to sleep() a pre-determined
amount of time too ;-)
Uhmmm.. how effective is a brute force attack where you can only try one
combination per second? It's going to take
On Wednesday 21 July 2004 05:00, Pablo M. Rivas wrote:
sleep() is the brute deffense of the brute force attack...
You can make a script that opens simultaneous attacks
One thing to bear in mind is that sleep() will hog resources and can lead to
DOS.
--
Jason Wong - Gremlins Associates
Tim Van Wassenhove wrote:
In article [EMAIL PROTECTED], John W. Holmes wrote:
Daevid Vincent wrote:
Similarly, I could adjust my brute force attack to sleep() a pre-determined
amount of time too ;-)
Uhmmm.. how effective is a brute force attack where you can only try one
combination per second?
Hello,
Is anyone familiar with what would cause an error like this:
Warning: Statement isn't valid anymore in includes\import.inc.php on
line 810
I'm using MySQL 4.1.2a, PHP 5.0.0 with Apache 2.0.50. All tables are
InnoDB format.
The calling function is:
function insert_phone($ContactID) {
Gilmore, Corey (DPC) wrote:
Is anyone familiar with what would cause an error like this:
Warning: Statement isn't valid anymore in includes\import.inc.php on
line 810
1. Which line is 810? That's going to really help someone determine why
you may be getting this warning.
2. This is a warning,
John Holmes wrote:
Gilmore, Corey (DPC) wrote:
Is anyone familiar with what would cause an error like this:
Warning: Statement isn't valid anymore in includes\import.inc.php on
line 810
1. Which line is 810? That's going to really help someone determine why
you may be getting this
For some background, I've been tasked with building a marketing tracking application
by the PHB's who think that being able to write SQL means you can code. I know how to
get data into a database and I can do thing with it once it's in there, but this is
one of my first attempts at extracting
Jimi,
PHP does not return an error because it knows nothing about valid sql.
It's just knows if it's a valid PHP statement. (which it is because
you've got the 's in the right place and a ; at the end. ) :)
It's up to MySQL to return an error.
As to your statement.
1: It's easier and valid in
Thompson, Jimi wrote:
So then I try do this
?php
if ($fk_phone != NULL) {
$sqlwrk = SELECT `pk_phone_reports`, SUM(`calls`) AS `total_calls`,
`date`, `calls` , `fk_ph_num` FROM `phone_reports`;
$sqlwrk .= WHERE `pk_phone_number` = . $fk_phone;
$rswrk =
Hi,
Okay here is a sniplet of some code...
snip
?php
mysql_connect (localhost, tassie_jerry,
s2390lpTAS225);
mysql_select_db (tassie_tipping);
$qr = mysql_query(SELECT IF ( misc = ( 'y' ) , 'Form
Action=tipupdate.php
METHOD=POST
enctype=multipart/form-data', 'Form Action=tip1.php
METHOD=POST
Subject: [PHP-DB] Update Statement
hi all,
I would like to do the following:
update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no =
Table2.no
however, i found that multiple updates can only work for MySQL version 4.0.4
but mine is 3.23.54... can anyone enlighten me on how I can
- Original Message -
From: Ricardo Lopes [EMAIL PROTECTED]
To: Ng Hwee Hwee [EMAIL PROTECTED]
Cc: PHP DB [EMAIL PROTECTED]
Sent: Wednesday, February 18, 2004 5:41 PM
Subject: Re: [PHP-DB] Update Statement
you could use:
for ($i=0; $i max; $i++)
{
mysql_query(update Table1
hi all,
I would like to do the following:
update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no
however, i found that multiple updates can only work for MySQL version 4.0.4 but mine
is 3.23.54... can anyone enlighten me on how I can achieve the same results with
Chris wrote:
You can put together WHERE statements with an AND or
an OR. For
instance, SELECT id FROM users WHERE id='2' OR
id='3'
You know, if you had a few suspicions about this sort
of thing you
could
always give it a spin in a Query. Worst case scenario
is you will get
an error.
-
Hi,
If I was to want to use the WHERE statement multiple
times (more than once) how do I seperate each WHERE
statement?
Would it be with a ',' (coma) or a ' ' (space) or
what? Or not possible to have multiple WHERE's in
the
one query?
I need 2 tables checked before executing the
On Mon, 2003-10-20 at 00:56, JeRRy wrote:
Hi,
If I was to want to use the WHERE statement multiple
times (more than once) how do I seperate each WHERE
statement?
Would it be with a ',' (coma) or a ' ' (space) or
what? Or not possible to have multiple WHERE's in
the
one
I have a php script that does some select statements, on mysql, and
outputs that to a table. I would like to change the color of the table
row depending upon one of the fields. The select statements are from a
syslog database that I have and I would like to highlight key events by
changing the
/tr';
}// end while
HTH
Peter
-Original Message-
From: Christopher Lyon [mailto:[EMAIL PROTECTED]
Sent: 17 June 2003 22:35
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Select Statement with output in different colors.
I have a php script that does some
/tr';
}// end while
HTH
Peter
-Original Message-
From: Christopher Lyon [mailto:[EMAIL PROTECTED]
Sent: 17 June 2003 22:35
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Select Statement with output in different colors.
I have a php script that does some select
9:51 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Select Statement with output in different
colors.
Here's a slight alteration to Peter's code in case someone isn't
familiar with
switch statements. Ooh, such a bad pun, as if there's any other kind.
?
$query = 'SELECT * FROM table
I hope this is something easy I am overlooking but here goes:
I have a table called: country which has the following fields:
FieldType
ip_from double(11,0)
ip_todouble(11,0)
country_code char(2)
country_name varchar(50)
IP_FROM
On 13 Jun,2003 at 0:48 G E Holt wrote:
$resolved=$DB_site-query_first(SELECT * FROM country WHERE
'$resolvingip' BETWEEN ip_from AND ip_to);
Don't think you should have the '' around the ip number. Does that help?
Ronan
e: [EMAIL PROTECTED]
t: 01903 739 997
w: www.thelittledot.com
The
On Friday 13 June 2003 15:48, G E Holt wrote:
I hope this is something easy I am overlooking but here goes:
I have a table called: country which has the following fields:
FieldType
ip_from double(11,0)
ip_todouble(11,0)
country_code
Here's how I did it when playing with this...
Table definition:-
CREATE TABLE ip_list (
ip_from double default NULL,
ip_to double default NULL,
country_code char(2) default NULL,
country_name varchar(100) default NULL,
KEY ip_from (ip_from,ip_to,country_code,country_name)
)
Why not use the built-in conversion functions in mysql?
From the manual:
quote
INET_NTOA(expr)
Given a numeric network address (4 or 8 byte), returns the dotted-quad representation
of the address as a string:
mysql SELECT INET_NTOA(3520061480);
- 209.207.224.40
INET_ATON(expr)
Given
I'm looking for a mysql select statement that does the
following:
- Check if the value of each expert.id on the table
experts matches a value expt.id in the table
apliexpert.
- For those values where this is true check whether
the softID value for that row matches the variable
$softId.
- return
;
--
Beverly Steiner
[EMAIL PROTECTED]
-Original Message-
From: Jason End [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2003 8:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql statement: two tables, two comparisons
I'm looking for a mysql select statement that does the
following
Hi there everyone,
Thank you all for your answer - DOH I can't believe I missed something so simple :-)
Regards
Chris
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
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
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
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
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
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?
if you want to search for multiple words, u have to use multiple
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
What's the error?
-Original Message-
From: Steve Dodkins [mailto:Steve.Dodkins;ebm-ziehl.co.uk]
Sent: 25 October 2002 16:46
To: Php-Db (E-mail)
Subject: [PHP-DB] select statement
Hi
I get an error message with the following statement, if I remove the 'AND
works_order_part_no
Hi All
I have created a function and insde that function it dose a standard
select, fetch_arry, while loop.
I get a error from mysql saying not a vaild resource but if I take the
statemnet out of the function all works fine and dandy.
Are there things I should be aware of when trying to include
you should return the results.
hope that helps.
-rob
-Original Message-
From: Dave Carrera [mailto:dave;davecarrera.com]
Sent: Friday, October 18, 2002 10:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySql Statement inside a function?
Hi All
I have created a function and insde
]
Sent: Friday, October 18, 2002 11:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySql Statement inside a function?
Hi All
I have created a function and insde that function it dose a standard
select, fetch_arry, while loop.
I get a error from mysql saying not a vaild resource but if I
Hello all,
I have this SQL statement I am trying to use and no matter what combination I use, I
cannot get it to work. The start and end if clauses need to be grouped together.
SELECT * FROM tickets_work WHERE employee_id = '$tech_id' ( start '$start' end
'$end' ) ORDER BY start
Anyone
is MySQL)
Rich
-Original Message-
From: Evan S. Weiner [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 2:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SELECT statement problem
Hello all,
I have this SQL statement I am trying to use and no matter what combination
I use, I cannot get
= $row[total_billable];
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 2:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] SELECT statement problem
SELECT * FROM tickets_work
WHERE employee_id = '$tech_id' AND
start '$start
];
$total_billable = $row[total_billable];
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 2:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] SELECT statement problem
SELECT * FROM tickets_work
WHERE employee_id = '$tech_id' AND
start
can I use an OR operator in a variable that is passed through a url?
ex. how can I combine the following two lines so that I end up with records
that have an id of either 1 or 2?
http://www.xyz.com/foo.php?FooID=1
http://www.xyz.com/foo.php?FooID=2
(I tried the following, but it didn't work:
Pass different variables and use them both in your query.
http://www.xyz.com/foo.php?FooID=1
http://www.xyz.com/foo.php?Foo2ID=2
$query = SELECT * FROM table WHERE id=$FooID OR id=$Foo2ID;
HTH
Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums:
How about
http://www.xyz.com/foo.php?FooID[]=1FooID[]=2
Then FooID will be an array of the values.
-Steve
On Thursday, July 18, 2002, at 03:20 PM, Matthew K. Gold wrote:
can I use an OR operator in a variable that is passed through a url?
ex. how can I combine the following two lines so
// To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
// Subject: Re: [PHP-DB] or statement in url
//
//
// Pass different variables and use them both in your query.
//
// http://www.xyz.com/foo.php?FooID=1
// http://www.xyz.com/foo.php?Foo2ID=2
//
// $query = SELECT * FROM table WHERE id=$FooID OR id
Hi All
I am trying to load a mysql statement which i have tested and know to work
from a var in my script.
It is a create table statement.
I have a good connection as a table list shows tables.
I tried to echo my var but no joy
Any ideas?
Thanks in Advance
Dave C
--
PHP
Okay, now this is my first try on fetching data from two tables, and frankly
I'm starting to pull my hair out ;)
All I want is to fetch some data from two seperate tables in my database.
So far I have tried different approches, and below is what I think should
work, but doesn't :(
SELECT *
Okay, now this is my first try on fetching data from two tables, and frankly
I'm starting to pull my hair out ;)
All I want is to fetch some data from two seperate tables in my database.
So far I have tried different approches, and below is what I think should
work, but doesn't :(
SELECT *
Well, the first question is what's the expected output?
If you're trying to get, say, title from table1 and rating from table2
and identify the books in table1 by the unique field id and in table2
by the field book_id, then this is what you should have to end up with:
SELECT t1.title,
://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SELECT
'Luck
-Szii
- Original Message -
From: admin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 5:48 PM
Subject: [PHP-DB] JOIN statement not producing expected output
Okay, now this is my first try
Ok here is my question... I have a form that reads the contents of a
directory, places the resulting files into a select box within a form for
further processing, code is as follows:
?php
$dir_name = /virtual/path/to/images/directory/;
$dir = opendir($dir_name);
$file_list .= pFORM METHOD=\post\
On Wednesday 10 April 2002 12:32, jas wrote:
Ok here is my question... I have a form that reads the contents of a
directory, places the resulting files into a select box within a form for
further processing, code is as follows:
[snip]
What I need to know is if there is a way to create an if
: [PHP-DB] include() statement hell!
Thanks Jonathan,
I'm trying to include a file /includes/dblib.inc from /main/page.php. In
/main/page.php I use include(includes/dblib.inc);. When that didn't work,
I tried copying the file to /main/ and including it there and that didn't
work either. Finally
PROTECTED]
Subject: RE: [PHP-DB] include() statement hell!
So, maybe this is the question. Can you include a file from
/main/page.php by using a path of /includes/dblib.inc?
Probably not. PHP can see the whole filesystem, not just the area that is
limited to your account. So, when you try
om: Brad Melendy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 7:27 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] include() statement hell!
Thanks Jonathan,
I'm trying to include a file /includes/dblib.inc from /main/page.php. In
/main/page.php I use include(includes/dblib.inc)
1 - 100 of 156 matches
Mail list logo