[PHP-DB] Update

2002-02-04 Thread Jennifer Downey
Hi, I am having problems with this code. I want to update a members number of days they have been a member can anyone help? $query["days"]=("UPDATE users set days_member VALUES = ('days_member' + '1')); $result=mysql_query($query["days"]); Thanks in advance JD -- PHP Database Mailing List (

Re: [PHP-DB] Update

2002-02-04 Thread Jennifer Downey
they explain in technical terms in which 98% of us don't understand. So we have to do things by trial and error and learn by our mistakes and pray that someone who does know can explain in a way that we can understand. Regards Jennifer Downey "Miles Thompson" <[EMAIL PROTECTED]&g

[PHP-DB] Username

2002-02-05 Thread Jennifer Downey
nto the database. As soon as test.php shows in browser, the Username, submit button and box ar e there but also it prints the "There has been a problem." right off the bat. Now I know there are misprints in the book and I hope I was smart enough to catch them but maybe not. can someone

Re: [PHP-DB] Username

2002-02-05 Thread Jennifer Downey
ame & password? > > I've found the articles at devshed to be helpful in the past. This > particular one has a pretty good explaination of setting up a user > authentication system: > > http://www.devshed.com/Server_Side/PHP/TimeIsMoney/TimeIsMoney1/page1.html > > Robe

[PHP-DB] Ok another update

2002-02-07 Thread Jennifer Downey
ate once a day. Any help would be appreciated! Thanks Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] PHP MySQL and updating

2002-02-09 Thread Jennifer Downey
Hi again, I am having trouble with updating. How do I tell php to update the database at mid night instead of every time the browser is refreshed? I have looked for it but can't find the info. Also I thought session ID's were different between users. Is this true? Thanks Jenni

[PHP-DB] Updating Database at a specified time

2002-02-17 Thread Jennifer Downey
a way to set this code up to do what I need? Thanks in advance! Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] cron job

2002-02-18 Thread Jennifer Downey
Ok I have the cron job figured out. The only thing I would like help with is how to update all users in a table. This just updates a spacific user: $db["points"]=("UPDATE wt_users set points = points + 1000 WHERE uid={$session["uid"]}"); $result=mysql_query($db["points"]); How would I use this t

[PHP-DB] A good tutorial

2002-02-19 Thread Jennifer Downey
If anyone knows of one, would someone please point me towards a good tutorial on storing images in a database then fetching them out again. I would really appreciate it and thanks in advance! Jen Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

[PHP-DB] Re: A good tutorial

2002-02-20 Thread Jennifer Downey
harola = "tempimages/". $userfile_name; > > // insert path into database here > # connect to db > $connectionToDBid = odbc_connect("cdefc5onwesulertt", "joeyscon", > "joeyscon"); > > session_register("consultantid"); > $c

[PHP-DB] Join

2002-02-20 Thread Jennifer Downey
Could someone point me in the right direction for joining tables? I have searched the php manual for it but only found info on joining arrays. If someone could point me to a code snip or a tutorial I would much appreciate it. Thanks in advance Jen Downey -- PHP Database Mailing List (http:/

Re: [PHP-DB] Join

2002-02-21 Thread Jennifer Downey
h help :) > > JOIN is an SQL command, so check out the manual of your RDBMS (ie. > http://www.mysql.com/doc/J/O/JOIN.html for MySQL) > > good luck :) > > Beau > > // -Original Message- > // From: Jennifer Downey [mailto:[EMAIL PROTECTED]] > // Sent: Thursday, 2

[PHP-DB] Parse error

2002-02-21 Thread Jennifer Downey
Can someone tell me why I am getting a parse error in this little snip? Original value is $origVar"; $origVar += 25; echo "Added a value, now it's $origVar"; $origVar -= 12; echo "Subtracted a value, now it's $origVar"; $origVar .= " chickens"; echo "Final answer: $origVar"; ?> Thanks in adv

[PHP-DB] Re: Parse error

2002-02-21 Thread Jennifer Downey
or wasting all your time. I'll try to think better in the future. Thanks Jen "Jennifer Downey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Can someone tell me why I am getting a parse error in this little snip? > > >

[PHP-DB] Add and Subtract

2002-02-22 Thread Jennifer Downey
Hi All, Would someone please help me with the following code? I am trying to make this work like if I have 15 gold pieces and I deposit 5 it will subtract 5 from the gold pieces I have and deposit the 5 into my account showing that I now have 10 gold pieces I can deposit and 5 in the bank. I wo

[PHP-DB] Instest of add, subtract.

2002-02-23 Thread Jennifer Downey
n["uid"]}" ); $result=mysql_query($db["bank_points"]); Thanks in advance Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] If else trouble

2002-02-24 Thread Jennifer Downey
l_result <= "0") { echo "you don't have enough points!"; }else{ echo "Your withdraw has been made!"; } Thanks in advance Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Still bangin my head

2002-02-25 Thread Jennifer Downey
ints are at 0 then print no points and quit. if ($sql_result <= "0") { echo "you don't have that many points"; exit; } else { echo "Your withdraw has been made!"; Thanks again in advance Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: using sendmail w/ windows

2002-02-26 Thread Jennifer Downey
arguments as well (default: 'sendmail -t -i'). ;sendmail_path=this is the path to sendmail <--leave this commented out. HTH Jennifer Downey "Crosswalkcentral" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > any one know h

[PHP-DB] Storing image path to database

2002-02-27 Thread Jennifer Downey
(id) ) TYPE=MyISAM; Thanks in advance Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Join tables

2002-02-28 Thread Jennifer Downey
query($pet); $query = "select binary_data,filetype from image_data where id=$id"; $result = @mysql_query($query); I'm using echo ""; to display the image how do I join the two tables so that the id's match and give the correct image? And again thanks in advance for your

Re: [PHP-DB] Join tables

2002-02-28 Thread Jennifer Downey
Ok thanks for that info, but I guess I am ignorant to what MS Access is. Please enlighten me. Thanks Jennifer Downey "Marius Ursache" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; > the best tool for building "join" queries is MS Access . > >

[PHP-DB] I'm really stuck!

2002-02-28 Thread Jennifer Downey
mage? if($id) { $id = $pet; $query = "select bin_data,filetype from image_data where id=$id"; $result = mysql_query($query); $data = mysql_query($result,0,"bin_data"); $type = mysql_query($result,0,"filetype"); Header( "Content-type: $type"); echo $data; }; echo ""; Thanks Jennifer Downey

[PHP-DB] Rounding numbers

2002-03-01 Thread Jennifer Downey
mysql_fetch_row($ret)) $yearly_interest=$bank_points * $interest; print("Your yearly interest is : $yearly_interest"); $daily_interest=$yearly_interest / $days; $round_daily_interest = round($daily_interest); print("Your daily interest is : $daily_interest"); Thanks Jennifer Downe

[PHP-DB] Rounding numbers again.

2002-03-01 Thread Jennifer Downey
y_interest=$round_yearly / $days; $round_daily = round($daily_interest); $query = "UPDATE wt_users set bank_points = bank_points + $round_daily"; $ret = mysql_query($query); If I use the users session id then it works fine. With the query all I'm doing is updating ALL users bank_points right? I want to use cron to update all users at midnight. Thanks again Jennifer Downey

[PHP-DB] Tutorial?

2002-03-02 Thread Jennifer Downey
Hi all, Can anyone point me to a good tutorial on how to disable a submit button once clicked? preferably in php. Thanks Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] WHERE clause

2002-03-03 Thread Jennifer Downey
Wondering do I have to have the WHERE clause in a select query? $b=mysql_query( SELECT * FROM my_table) <-can I use something like this or do I have to put WHERE in the statement? Thanks Jennifer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP-DB] If else Question

2002-03-25 Thread Jennifer Downey
Hi all, I have a table called pets, here is a partial dump: At this time this is all I am working with. uid int(10) NOT NULL default '0', num_pet tinyint(1) NOT NULL default '1', There are three steps to adding the pet into the db Step 1 create the record, this is in create.php. And yes b

[PHP-DB] MySQL, PHPand cron

2002-03-28 Thread Jennifer Downey
Hi all, Wondering if anyone might know how to empty a table with a php script and cron job? Would someone point me to a tutorial or help with this? TIA Jennifer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Unknown column 'Test' in 'field list'

2002-03-28 Thread Jennifer Downey
Hi All! Hope I'm not bothering you nice people too much. I have a account called Test, when I click the submit button I get this error Unknown column 'Test' in 'field list' My table only has two fields id and user_name I am not trying to insert the data into the field Test but into usre_name.

[PHP-DB] Unknown column 'Test' in 'field list'

2002-03-28 Thread Jennifer Downey
Never mind I forgot to put ' ' around $u_name in my insert. Jen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] int or tinyint

2002-03-31 Thread Jennifer Downey
Hi all, Just a simple question (I think). When should I use tinyint over int. and what is the difference between the two? Thanks Jennifer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Table structure and displaying certain thing

2002-03-31 Thread Jennifer Downey
Hi all, I have a table called items here is a dump: CREATE TABLE items ( id int(10) NOT NULL auto_increment, name varchar(50) NOT NULL default '', item_type int(4) NOT NULL default '0', image varchar(100) NOT NULL default '', price int(10) NOT NULL default '0', quantity int(5) NOT NU

[PHP-DB] Date Question

2002-04-03 Thread Jennifer Downey
Hi all, If I have a feild called 'date' and the type is date when a form is submitted isn't it suppose to automatically enter the date or do I need to somehow enter it through the form? The reason I ask is that I have another form with a date type and no reference to it in the form and it is al

[PHP-DB] Forms and mysql

2002-04-04 Thread Jennifer Downey
Hi all, I know I've asked this before and wouldn't be asking again if I had the email that you people replied back with. Windows took a you know what on me and I had to format the hard drive. Anyway here is what I have. This is items.php: "; echo "$return[name]"; echo "Quantity $return[quanti

Re: [PHP-DB] Forms and mysql

2002-04-04 Thread Jennifer Downey
> wrote in message news:[EMAIL PROTECTED]... > On Friday 05 April 2002 07:55, Jennifer Downey wrote: > > Hi all, > > > > I know I've asked this before and wouldn't be asking again if I had the > > email that you people replied back with. Windows took a you know

Re: [PHP-DB] Forms and mysql

2002-04-04 Thread Jennifer Downey
In any case the email or replies are not in the archives. I have searched them and came up empty. "Marius Ursache" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Jennifer Downey a écrit : > > > If you had read

[PHP-DB] Session problem?

2002-04-06 Thread Jennifer Downey
Hi all, This code is working greate except for one minor bug. If I have 2 or 3 items at different prices buy.php is updating the points of the user at the last priced item. In other words if item 1 costs 1965 item 2 costs 564 item 3 costs 25 and item 1 is clicked it only takes away 25 points i

[PHP-DB] if else question

2002-04-07 Thread Jennifer Downey
Hi all, Just wondering if something like this is valid. If not how can I make it valid? if (mysql_num_rows($result) and (mysql_num_rows($ret) == 0) Thanks Jennifer --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Da

[PHP-DB] Different if else question

2002-04-07 Thread Jennifer Downey
Hi all, I guess I should have gone ahead and put the whole code in because I didn't get accomplished what I set out to do in the last if else question. I found a slight bug and am wondering if someone could help. If another user logs in and buys the same item as I do then my item is updated in

[PHP-DB] Re: Error creating new table

2002-04-08 Thread Jennifer Downey
I to have about 16 text fields in my db that are NOT NULL and they work fine. Just an observation. Jennifer "Lisi" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am trying to create the following table using PHPMyAdmin: > > CREATE TABLE IF NOT EXISTS ayny(

[PHP-DB] Multiple selects?

2002-04-08 Thread Jennifer Downey
Hi all, You are probably getting tired of me asking questions but I have another and will try to keep them down from now on. If I have let's say five items with different id's, image's and so forth how do I display all items on one page. Do I have to use multiple selects or is there another easi

[PHP-DB] Re: Multiple selects?

2002-04-08 Thread Jennifer Downey
about? > If so, I have the code for it. I wrote the cart that is hosted on that page > and can post some code from it if you would like.. > > Thanks, > > Bob Weaver > > "Jennifer Downey" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">ne

[PHP-DB] Not displaying all records

2002-04-10 Thread Jennifer Downey
Hi all, I had to re-write this so it would at least show something on the page. $query = "SELECT id, name, image, quantity FROM {$config["prefix"]}_my_items WHERE uid={$session["uid"]} ORDER BY id"; $ret = mysql_query($query); $row = mysql_fetch_array($ret); $id = $row['id']; $image = $row['ima

Re: [PHP-DB] Not displaying all records

2002-04-10 Thread Jennifer Downey
Thank you Jason that worked out great! Jennifer "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > On Wednesday 10 April 2002 23:54, Jennifer Downey wrote: > > Hi all, > > > > I had to re-write this so it would at least show

[PHP-DB] HTML tables in PHP

2002-04-10 Thread Jennifer Downey
Hi everyone! Is there a good tutorial on how to write html tables in PHP? In my last post "Not displaying all records" I have the items displayig all the contents of the table but they are in descending order. like this item 1 item 2 Here is the code I am using $query = "SELECT id, name, image

[PHP-DB] Re: HTML tables in PHP

2002-04-10 Thread Jennifer Downey
Thank you all I managed to get it worked out like this $name$quantity"; echo "$display_block"; } echo""; ?> Jennifer --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 --

[PHP-DB] Closing curly brackets?

2002-04-12 Thread Jennifer Downey
Hi everyone, I originally posted this in general by mistake. I have a question about this code. The way it sits now it always shows the last record in the database table. In other words if the user has 6 items, like: item id 1 item id 2 item id 5 item id 6 item id 7 item id 8 it will only show

[PHP-DB] Re: Closing curly brackets?

2002-04-12 Thread Jennifer Downey
efore to do what appears to be similar while loops.. > Wouldn't the data still get retrieved in array form with that? If I'm wrong, > feel free to publicly ridicule me.. > > Later, > > Bob Weaver > > "Jennifer Downey" <[EMAIL PROTECTED]> wr

Re: [PHP-DB] Closing curly brackets?

2002-04-13 Thread Jennifer Downey
s:[EMAIL PROTECTED]... > on 4/12/02 11:15 PM, Jennifer Downey at [EMAIL PROTECTED] appended the > following bits to my mbox: > > > I believe it has something to do with the first while statement's closing > > curly bracket placement > > but I can't seem to get i

[PHP-DB] Delete from mysql table is there a way to....

2002-04-14 Thread Jennifer Downey
Hi all, Is there a way to delete a record from a mysql table without fragmenting the db? Here is the query I am using and it does a horrible job. Fragment city. if ($quantity == 0) { $gone = mysql_query("D

[PHP-DB] Delete from mysql table is there a way to....

2002-04-14 Thread Jennifer Downey
Hi all, I'm not sure if my first post showed up so I am going to post it again and I apologize if it shows up twice. Is there a way to delete a record from a mysql table without fragmenting the db? Here is the query I am using and it does a horrible job. Fragment city. if ($quantity == 0) {

[PHP-DB] Search tutroial

2002-04-24 Thread Jennifer Downey
Hi all, Would someone kindly point me to a tutorial on designing a search script for mysql db. I have tried to build one but can't get anywhere with it. Thanks Jennifer -- The sleeper has awaken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.co

Re: [PHP-DB] Search tutroial

2002-04-24 Thread Jennifer Downey
This is basically what I am trying to do if($search) { $query = "SELECT uid, id, image, iname, quantity, type FROM {$config["prefix"]}_shop WHERE iname = $shopsearch"; $ret = mysql_query($query); while(list($quantity)=mysql_fetch_row($ret)) $name = $row['user']; echo $name; }else{

Re: [PHP-DB] Search tutroial

2002-04-24 Thread Jennifer Downey
By the way SELECT uid, id, image, iname, quantity, type, user where it shows below that user isn't in the query- it is there in my editor. I just forgot to put it in before sending. Jennifer "Jennifer Downey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">new

[PHP-DB] Search Script

2002-04-25 Thread Jennifer Downey
Hi all, I have been trying to build a search script for my site that deals with only one table in my db. As Julie Meloni pointed out look in the MySQL manual for LIKE clauses I can't seem to locate that clause in ether manual. Dan Brunner gave me this to go on: $query = "SELECT uid, id, image, i

Re: [PHP-DB] Search Script

2002-04-25 Thread Jennifer Downey
EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The query should read as below, without the = after the LIKE: > > $query = "SELECT uid, id, image, iname, quantity, type FROM > {$config["prefix"]}_shop WHERE iname LIKE '

[PHP-DB] Re: Search Script

2002-04-25 Thread Jennifer Downey
#x27;quantity']; $type = $row['type']; $price = $row['price']; } if($searchword == $iname) { echo ""; echo "$user"; echo "$iname"; echo "$q"; echo "$price"; echo ""; } }else{ echo ""; echo &q

Re: [PHP-DB] Re: Search Script

2002-04-25 Thread Jennifer Downey
'ABC'; > -> 1 > mysql> SELECT 'abc' LIKE BINARY 'ABC'; > -> 0 > > I am not sure why it is showing case sensitivity, unless as it states, one of > the operands is a binary string. > > HTH > > Maureen > > Jen

[PHP-DB] Re: Search Script

2002-04-25 Thread Jennifer Downey
want it to. What I needed to do is have it where it isn't == to anything in otherwords a null value. So if $searchword = $iname then it will work as it is suppose to. Thanks everyone for your time, effort and help. Jennifer "Jennifer Downey" <[EMAIL PROTECTED]> wrote i

[PHP-DB] Re: FORM not inserting data

2002-04-25 Thread Jennifer Downey
As many people have told me and I have just now got it through my thick head try either echoing the query or use $result = mysql_query($sql) or die(mysql_error()); You will find out what is being passed (or not passed) through your variables or find out what error you are getting. HTH Jennife

Re: [PHP-DB] Re: Search Script

2002-04-25 Thread Jennifer Downey
do a search for something in upper case that is in the database in > lower case. If this works, then it looks like the situation above. I think > previously, you were searching using all lower case for a word that was in > the database with an upper case letter in it. > > HTH &

[PHP-DB] Not getting results if 0

2002-04-29 Thread Jennifer Downey
Hi all, I am wondering how to keep something from beind displayed if a price is set to 0? I have a store where the user looks up items, but it shows all items even if the price is 0. Is there a way to prevent the items set at 0 from being displayed? Thanks Jennifer -- The sleeper has awaken

Re: [PHP-DB] Not getting results if 0

2002-04-29 Thread Jennifer Downey
15C0A1D311BF0D0004AC4C4B0C024AC071@SSIMSEXCHNG... > Are you looking it up in a database? If so you'd want to do something like > where price > 0. Then it wouldn't return those results. > > -Natalie > > -Original Message- > From: Jennifer Downey [mailto:[E

[PHP-DB] Simple search engine gone bad

2002-04-29 Thread Jennifer Downey
Hi all, It's Monday, it's probably something stupid, but I have poured over this all day and cannot find the problem. This is a simple search engine based on one table. It is suppose to return the results of the search word. Instead it returns ALL records in the mysql table. If I type the letter

[PHP-DB] Re: Can't Load Data into Mysql Using PHP

2002-04-29 Thread Jennifer Downey
include 'phpstudy/constant.inc'; $link=mysql_pconnect(HOST,USER,PASSWD); mysql_select_db(DBNAME,$link) or die(mysql_error()); This will give you the errors if any. HTH Jennifer "Jack" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Dear all > I had a problem

[PHP-DB] Re: How to force a new browser page?

2002-04-30 Thread Jennifer Downey
I don't know if this is what you are looking for but it will open a new browser window. You may have to play with it to get it the way you want. Your Link HTH Jennifer "Bob Parker" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm working on an intranet ac

[PHP-DB] Re: Simple search engine gone bad

2002-04-30 Thread Jennifer Downey
Thanks all for your help. I knew it was somathing stupid and I knew it was because it was Monday. Now that it is Tues I have found the problem and it was somethin very stupid. I forgot echo ""; Now it work as it should. Again thanks Jennifer. "Jennifer Downey" <[EMA

[PHP-DB] Link for next db record

2002-05-12 Thread Jennifer Downey
Hi all, Wondering if you could help or point me to a tut where I can use a link to get the next record in the db? Like Previous recordNext record How do I go about doing this. Thanks Jennifer -- The sleeper has awaken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus sys

Re: [PHP-DB] Link for next db record

2002-05-12 Thread Jennifer Downey
uery something like > > SELECT * FROM table LIMIT $record, 1 > > rather than > > SELECT * FROM table WHERE id='$record' > > Since that takes them in whatever order, but only SELECTs from $record and > gets 1 record. > > HTH > > Beau > > &g

Re: [PHP-DB] Link for next db record

2002-05-12 Thread Jennifer Downey
This line sets $row["rv_space"] echo"Search Record by Space Number  "; "Beau Lebens" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > How are you setting the value for $row["rv_space"] ? > > /