Yes there is an auto increment field in mySQL and most other databases.
>>Can any of you guide me how to do auto increament in a field?
>>I think there is one datatype for auto increament.
>>But I dont know how to do it ?
>>
>>Rinku
--
PHP Database Mailing List (http://www.php.net/)
To unsubscr
A drop down with 365 days !?!? Isn't that a "little" big?
> I have a problem, I currently have some code which populates a dropdown
> box
> - this code gives me every day for the next x amount of days (EG: a years
> worth of days), however what I really need to be able to do, is to find a
> way
What are you setting $_SESSION['sid'] to?
> i do ($_SESSION['sid']), but the variables remain empty...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Are you getting any errors displayed?
The php.ini file has to have a directory specified for the session temp
variables.
> I want to use sessions to check wether a user is logged in or not.
> Therefore,I use session_start and session_register. When I registere the
> values on the same page, they
Sounds like it doesn't like your SQL statement. Perhaps a field or table
name is incorrect?
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> result
> resource in .......
> "Daniel Clark" <[EMAIL PROTECTED]> wrote in message
> news:[EM
What error are you getting?
> why doesn't this work:
> $pic=mysql_query('SELECT Rune, username FROM RuneRunner
> RuneRunner_1 WHERE (User_ID = 3)',$connection);
> $pic=mysql_fetch_array($pic);
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
Good point. Since it's form data, what about $_POST['TimesheetID'] ?
> Don't see anything obviously wrong with your query string. Are the inserts
> happening in the same block of code, i.e., are you sure that
> _$TimesheetID_ has a value in it when you're performing the second insert?
>
>
> -dave
Any errors? Is the all the other data inserting into the second table?
> Hello,
> I am using a form to Insert data into 2 tables in the same database.
>
> $TimesheetID needs to be in each table. However, it is not being inserted
> into the second table, "tblTimesheetDetails" . Any advise?
>
> $r
I'm not sure you need a semi-colon after the table name.
$result = mysql_query( 'Select * From newsletter_subscribers', $db );
>>
>>To: [EMAIL PROTECTED]
>>MIME-Version: 1.0
>>Content-Type: text/plain; charset=us-ascii
>>
>>I'm trying this query:
>>
>>$link = mysql_connect( $site, $id, $pass );
>
I think you want mysql_insert_id()
http://us3.php.net/manual/en/function.mysql-insert-id.php
> I have the typical problem with retrieving auto increment value in
> php-mysql environment.
>
> I have search info in mysql page and I have found LAST_INSERT_ID()
> funtion but I don't know how to use
I'd think there where multiple files with jpg and gif extensions.
Like:
image1.jpg
image1.jpg.jpg
>>Anybody has an idea about what happened to me ?
>>
>>The following script should just charge in a mysql db the images located in
>>a directory. Unfortunately everytime I call "readdir.php" (neve
>>but it is the wrong version. If I only knew what DLL was needed!
>>
>>Daniel Clark wrote:
>>> Is the file in c:\tools\php\extensions\php_oci8.dll ?
>>>
>>>
>>>>>Hi,
>>>>>I am experiencing the message in the title of this
Is the file in c:\tools\php\extensions\php_oci8.dll ?
>>Hi,
>>I am experiencing the message in the title of this message when starting
>>or restarting Apache. I have the following configuration:
>>
>>- Windows XP
>>- Apache 2.0.49
>>- PHP 4.3.6
>>- Oracle Client 8i
>>
>>If anyone has any informat
Not tested... how about something like this?
SELECT t1.email, t2.count(*)
FROM $table t1
LEFT JOIN $table t2 ON (t1.email = t2.email and t2.viewed = '1')
GROUP BY EMAIL
> Nope...
> HHmmm, this is really getting to me...
> I can do distinct, I can count, but I can't combine the two?
> Can't be th
OK, how about this?
$sql = "SELECT DISTINCT(email) FROM $table";
$result = mysql_query($sql,$connection) or die("Couldn't execute query
0.");
while ($row = mysql_fetch_array($result)) {
echo $row[email] ;
$sql1 = "SELECT * FROM $table WHERE viewed = '1' AND email =
'$row[email]'
Is this what you want ??
$sql = "SELECT DISTINCT(email) FROM $table";
$result = mysql_query($sql,$connection) or die("Couldn't execute query 0.");
$row1 = 0;
while ($row = mysql_fetch_array($result)) {
echo $row[email] ;
$sql1 = "SELECT * FROM $table WHERE viewed = '1' AND
I've used Oracle for years, and am not aware of Oracle having case sensitive column
names.
>"Torsten Lange" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>>
>> But when using queries on the USER_... data dictionary, Oracle
>> delivers always big letters, which is for ch
The index should still work normally.
>>Hello.
>>I have a question about behaviour of indices in queries with inversed LIKE
>>in MySQL. I mean something like this:
>>
>>"select foo from bar where '$some_string' LIKE some_field"
>>
>>where in the `some_field` I have a strings like 'symbols%' :)
>>
tesupport,
>>netdisbursements
>> from fec33104
>>
>>where status = i
>>
>>order by $sort_field $sort_order";
>>
>>**
>>On Sat, 29 May 2004 07:50:52 -0700, Daniel Clark <[EMAIL PROTECTED]> wrote:
>>
>>> Can you po
Can you post the code?
Something like:
WHERE status IN ('i', 'c', 'o') ;
>>This should be ultimately simple; it just doesn't work. I want to limit
>>display to rows from a single table in which the status column contains
>>i. Only options are i, c, o. After the select line I have "
Are you using a FORM Post or Get ?
Perhaps $_POST['Name'] or $_GET['Name']
>>Hi!!
>>
>>I have a very simple and smail script with just one input text box and a
>>submit button.
>>After that, I have an echo function in the same code page that just
>>displays the data entered in the text box.
>>
ORDER BY date, text ?
> Hi!
> You can use "order by date" and such method:
>
> $result = mysql_query(blablabla);
> $date = "foo";
> while($news = mysql_fetch_array($result)){
> if ($date==$news["date"]){
> echo "new date";
> }
> echo $news["text"];
> $date = $news["date"];
$tmp isn't defined yet, so can't append to it's self.
(no .= )
$tmp = "ID : $row->ID \n";
> Two questions?
> First why am I getting undefined variable tmp , yet it works
> Second how would I insert data into this table?
> $db_table = 'log';
> $conn = mysql_connect($db_host,$db_user,$db_pas
Remove the single quotes or change to double quotes around the variables.
(in the mysql_connect() statement)
> Here is what I have so far?
> $DBname = "testdatabase";
> $host="localhost";
> $user="root";
> $password = "password";
>
>
> $dbconnect = @mysql_connect('$host','$user',
Remove the single quotes or change to double quotes around the variables.
> Here is what I have so far?
> $DBname = "testdatabase";
> $host="localhost";
> $user="root";
> $password = "password";
>
>
> $dbconnect = @mysql_connect('$host','$user','$password','$DBname');
>
> I know t
I had something like this too.
I used something other for the start and ending blocks.
<# #>
Then had a replace() section.
> Hi there,
> I (still :-) ) have the code of my php pages stored in a database. A main
> page parses this code using the "eval_html" function postet at php.net.
> This
>
Is it User_name or UserName?
Also try this string with 'UserName' in single quotes.
print "";
> I've tried but still does not work.
> when I put the varaibles name between ' '
>
> I found this error:
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> `T_NUM_STRING'.
>
> I
unless you have Globals turned on, I think you and
$_POST['variable_name_here'] in the second page.
print "\n";
> Hi,
>
> I am a new to php. I am using php ver 4.0.3 and MySQL.
>
> I have wrote two files and I'd like to pass some varaibles from first file
> to use them in the second file.
> bu
Very odd. I would think it would return every record seeing as the auto_increment ID
field is different for every record.
>>I use "SELECT DISTINCT tip, marca, model FROM modele" to select
>>records without duplicates on the field "tip". This works ok, BUT if I
>>use "SELECT DISTINCT tip, marca,
Torsten is right. eval() works great ... and so does having your php code in the
database :-)
>>"Florian Wagner" <[EMAIL PROTECTED]> wrote in message
>>news:[EMAIL PROTECTED]
>>> Hi there,
>>> I thought it would be a great idea to store the code of nearly all my web
>>> pages in "text" fields of
I think you need the quotes: $_SERVER['PHP_SELF']
> Try using the following:
>
> $_SERVER[PHP_SELF]
>
> Mainly, get rid of the quotes inside the brackets. Usually this error
> 'T_String' generally occurs when you have quotes (" or ') where they
> shouldn`t be.
>
> Give it a try if that thing still
We've ALL done it before :-)
> I am testing now testing it with the ==, silly mistake
>
> -Original Message-
> From: John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 30, 2004 4:38 PM
> To: Erik Meyer; PHP-DB
> Subject: Re: [PHP-DB] headers and if statements
>
>
> From: "Erik
I think that would try to set $login=1.
Need two ==
> Have you tried:
>
>
> -Original Message-----
> From: Daniel Clark [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 30, 2004 4:19 PM
> To: matthew perry
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] headers
Hum. Is $logIn null at times?!?!
>
>
> Why does this direct me to loginError.php even when $logIn = 1?
>
> - Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Still should be able to use the \" double quotes.
echo (" does it puke when its not using _self?
>
> Craig Hoffman wrote:
>
>> This is really becoming an irritating small bug. I tried the curly
>> brackets and the photo name still does not show up when I echo out the
>> query. Everything else ab
847) 644 - 8914
> f: (847) 866 - 1946
> e: [EMAIL PROTECTED]
> w: www.eclimbmedia.com
> _
> On Apr 29, 2004, at 6:49 PM, Daniel Clark wrote:
>
>> I think you want single quotes around PHP_SELF.
>>
>> "$_SERVER['PHP_SELF']"
I think you want single quotes around PHP_SELF.
"$_SERVER['PHP_SELF']"
> I have a script where it uploads a image to directory. I have used
> the script several times and it works when I send the form to another
> page. The problem is I have changed the form to submit to itself and I
> can't s
Depends on the browser. IE and Netscsape handle opening another window
differently.
> Hi, I have a problem in handling session... so I just reply in this topic.
>
> I have created a site... when user login from one browser ..i set a
> session['user']
>
> the problem is that when user open an
$rest = substr("abcdef", 1, 3); // returns "bcd"
http://www.phpbuilder.com/manual/function.substr.php
> What PHP function returns just the first letter of a string?
> - Matt
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PH
What about removing the quotes around the numbers.
if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 etc...
> My IF statement should be picking up on the numbers, and if the number
> matches not be displaying out the information, however I look at the
> outputted page and the information is s
write some
>> PHP to take the SQL statement results and feed them into an array and
>> count the distinct cardnums for each date and then spit it all into an
>> html table. thanks
>>
>> On Wed, 21 Apr 2004, Daniel
>> Clark wrote:
>>
>>> AND:
AND: any count >=1 shows they came in that day.
How about:
SELECT convert( varchar,eventime,110) as date from events, badge,
count(convert( varchar,eventime, 110)) as count
WHERE events.cardnum = badge.id and devid = '1' and
convert( varchar, events.eventime, 110) BETWEEN '$startdate' and '
How about:
SELECT convert( varchar,eventime,110) as date from events, badge,
count(convert( varchar,eventime, 110)) as count
WHERE events.cardnum = badge.id and devid = '1' and
convert( varchar, events.eventime, 110) BETWEEN '$startdate' and 'enddate'
AND type = '1'
GROUP BY convert( varchar
Can also open it in read only:
$fp = fopen ("/home/rasmus/file.txt", "r");
> Hi there,
>
> Thanks for the below, but I'll try to explain it a bit better.
>
> I don't have access to the ASP server, it's a general server setup for
> companies, to query their server you must use the ?pid=uniquecompa
TRUNCATE table xxx will delete all the rows of data.
DROP table xxx will delete the table.
> Hi everyone,
>
> I can not find in my manual a MySQL command which erase permanently a
> table
> and it?s content from a MySQL database.
>
> Thanks in advance
>
> Charalambos
>
>
My understanding is include_once() called several times in the same page
or include files will only be included once.
> Curious about "include_once" versus "include".
>
> All my connection stuff is in "conn.php3".
>
> I am planning on including it at the top of the page like this:
> include_once "
I've been getting the same errors, sometimes days latter.
> Why are my posts not getting through? I got 3 Delivery Report Failures on
> Thursday all due to
>
> Diagnostic was Unable to transfer, Message timed out
> Information Message timed out
>
--
PHP Database Mailing List (http://www.php.net
Try strip_tags()
http://www.phpbuilder.com/manual/function.strip-tags.php
> I have this string:
>
> $my_string = "hello worldthis is a test for a
> link with a image
>
> Is there any function that retrieves only the string without the html
> tags?!
--
PHP Database Mailing List (http://www.php
In PHP.INI there is a variable session.save_path.
Make sure it's uncommented and has a directory to store the temp session
files on the web server.
> I'm running Apache/2.0.49 and PHP/4.3.5 on windows XP. I get warnings:
>
> WARNING: session_start(): open/tmp\sess_242f6f668d85d512f9f4379ffa1e1,
>
I'm pretty sure it just shields the "on looker" from viewing.
View source in the browser still shows what the VALUE is, if any.
> Does using a pasword input type
> make the transfer more secure from someone "sniffing" my connection or
> does it only shield an onlooker from seeing what the user e
I've heard you want to use a TIMESTAMP field for that.
> i have created a mysql table where i would like to store the date and time
> whenever a user logs into a web site. the login is done through php/mysql
> as
> well but i'm not sure what the php code is to add the current date/time
> into
> a
> $query ="SELECT username FROM users WHERE username=('$username')";
> // $result = mysql_query($query, $db);
Above line should be uncommented.
> if (!$query)
And the "if" checking the number of rows returned from the $result set.
--
PHP Database Mailing List (http://www.php.ne
Try:
" .$row["class_code"]. "";
> while ($row = mysql_fetch_array($sql))
> {
> print "" .$row["class_code"]. "";
> }
> $result = $db->query($sql);
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What about the single quotes? Might try this.
$sql = "INSERT INTO log SET term=\'$search\', returns=\'$arrayword\',
time=CURTIME(), date=CURDATE(), ip=\'$ip\'";
> $sql = "INSERT INTO log SET term='$search', returns='$arrayword',
> time=CURTIME(), date=CURDATE(), ip='$ip'";
>
> echo $sql;
>
> $
Yeah, Looks good to me :-)
> Like http://us2.php.net/manual/en/function.array-change-key-case.php ??
>
>> > When Oracle returns the result set, the field names are all in upper
>> case. However, I have an application that needs to work on both
>> MSSQL and Oracle. I don?t want to keep 2 copies. On
I might try having a common PHP function that converts all field names to
lower case, and call that function with every field name.
Or call each field by column number, $row[1] .
> When Oracle returns the result set, the field names are all in upper
> case. However, I have an application that n
56 matches
Mail list logo