[PHP-DB] RE: mysl_connect question

2003-04-05 Thread Dave Carrera
Did you Mysql>FLUSH PRIVILEGES; ? http://www.ephgroup.com Secure Hosting Accounts for everyone. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 05 April 2003 19:42 To: [EMAIL PROTECTED] Subject: mysl_connect question When I use myssql to connect to a db

[PHP-DB] An interesting Apache Log to MySql ?

2003-03-29 Thread Dave Carrera
Hi All I have been trying to find a way to write Apache Log data to a MySql db via a pipe log directive. So far I have this: LogFormat "%v:*:%B:*:%u:*:%f:*:%h:*:%a:*:%s:*:%{%Y-%m-%d %H:%M:%S%z}t:*:%{Content-type:}o:*:%U:*:%{Referer}i:*:%{User-Agent}i:*:% {cookie}n" mysqllog As my Logformat dire

[PHP-DB] Generate thumbnails from MySql database

2003-03-27 Thread Dave Carrera
Hi all I have a database holding file locations of images on my system. This works fine and shows them fine on a webpage. I was wondering if it is possible to generate and automatic thumbnail from the original image (all jpegs) so that I can click the thumbnail to see the larger image. I know I

[PHP-DB] Grabbing emails into MySql

2003-02-24 Thread Dave Carrera
examples, websites, tips would be very much appreciated. Thanks in advance for any assistance. Dave Carrera --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.456 / Virus Database: 256 - Release Date: 18/02/2003 -- PHP Database Mailing

[PHP-DB] fgets find string help please

2003-02-11 Thread Dave Carrera
there…. while(!feof($socket)) { echo fgets($socket,128); } fclose($socket); $socket is working and echoing a result. Any help is very much appreciated Dave Carrera --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version

[PHP-DB] My whois function help please

2003-02-08 Thread Dave Carrera
very much appreciate it. Once I have this working I will place it on my site to download in case anyone else could use it. :-) As always thank you very much in advance. Yours truly, Dave Carrera -- Start of My Whois Function -- Function DomLookUp($domain){ $name = $_POST[domain

[PHP-DB] Array Issue help please

2003-01-20 Thread Dave Carrera
Hi All I have nearly got this working but it dose not seem to loop though or return the result I have done something wrong and I ask one of you coders that are much cleverer that I to glance over my code to see the obvious mistake / s. Thank you in advance for any help Dave Carrera

[PHP-DB] Array help please

2003-01-19 Thread Dave Carrera
always Dave Carrera --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003

[PHP-DB] Make new linux user accounts with pjp /mysql

2002-12-14 Thread Dave Carrera
Hi All I think this may be a bit of topic but here goes. I would like to know what logic is needed to create a new user on a Linux box Once this user has completed a sign up. I want to create my own php / mysql driven webhost control panel which allows Creation of vhost in http.conf Creation of u

[PHP-DB] MySql Statement inside a function?

2002-10-18 Thread Dave Carrera
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

[PHP-DB] Showing multiple option list from db query?

2002-10-03 Thread Dave Carrera
Hi All I have a database (mysql) that has some rows entered. Format: Name | Desription | catid This has some info in it like this Joe Man 1 Jack Man 1 Jacky Female 2 Emily Female 2 What I am trying to do is create dynamically created select lists so that all with catid 1 are in the fisrt sele

[PHP-DB] Writing to files (db related) ish

2002-09-25 Thread Dave Carrera
Hi All I know how to open, read & write to files using Php. But how can you write some content to a particular place in a file, Not the start or end but say the middle some where. Example: Basic html file Write my stuff here!!! This eventually will relate to a db so I hope its not c

[PHP-DB] Form Error Checking ?

2002-08-27 Thread Dave Carrera
Hi All I am very fed up and confused to why some simple form error checking is not working. All I want to do is check if a field has something in it the its ok else show error. I have a fields in my form that is for people to upload an image. I have tried this. If(!$_POST[img]){ Do something

[PHP-DB] Select * from t1.id where not equal to t2.id ???

2002-08-02 Thread Dave Carrera
High all I cant seem to get this sql working. I am trying to pull everything from table 1 (t1) where t1.id is not equal to table 2 (t2) id I cant find examples anywhere. Any help or guidance with this as always is very much appreciated. Thanks in Advance Dave C

[PHP-DB] Multiple select ?

2002-08-01 Thread Dave Carrera
Hi All I have a situation where I need to do select on my mysql db. Here is what I am trying to do Select * from table_name where col1=1 and col2=1 and col3=0 But this refuses to work. If I change the above to this. Select * from table_name where col1=1 OR col2=1 and col3=0 What I get is all

[PHP-DB] Header problem

2002-07-15 Thread Dave Carrera
Hi All My isp decided to upgrade to 4.2.1 without letting us know? So recoded scripts with new $_VARS in place but one thing refuses to work I have in my script a call to header location. header( "Location: ./file.php"); Works on my system but not on theirs I have 4.21 also. Is there

[PHP-DB] RE:using rand() in multiple insert ?

2002-07-06 Thread Dave Carrera
Hi All I worked it out. If you would make use of this kind of thing email me and I will gladly give the code example. Thanks Anyway Dave C

[PHP-DB] using rand() in multiple insert ?

2002-07-06 Thread Dave Carrera
Hi All I would like to know if it is possible to use rand in an insert query. I have to create a table of about 500 users for a project allocating a individual password for each. I was thinking that putting a rand() in the relevant valuses area of my mysql insert statement would do it. Could

[PHP-DB] making sub dirs ?

2002-06-16 Thread Dave Carrera
Hi All I have been hunting the answer to this for ages now and hope one of you clever prople could help. I wish to create a subdirectory in my images directory using my visitors id number. So i have an /img dir for all images and wish to create a directory based on clients id num from db

[PHP-DB] Array_rand issue...

2002-05-30 Thread Dave Carrera
Hi All I have a fuctioning array of about 20 items. What i would like to do is display 3 items from the array randomly and be able to place the output anywhere on the screen. I have looked at array_rand and associated functions at php.net and are currently playing with the code to see if i

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Dave Carrera
to finish my project :-)   Dave C P.S you can add a message var under break to then echo it to inform your user that its finished. ---Original Message---   From: Rasmus Lerdorf Date: Sunday, May 26, 2002 17:10:53 To: Da

Re: [PHP-DB] db sql issue from var

2002-05-26 Thread Dave Carrera
or me.   Any pointer and or code example would be most appreiciated.   Thank You   Dave C   ---Original Message---   From: Rasmus Lerdorf Date: Sunday, May 26, 2002 16:20:39 To: Dave Carrera Cc: php

[PHP-DB] db sql issue from var

2002-05-26 Thread Dave Carrera
Hi All I have found the problem from my last post and need to know how to solve it. Example sql var: $sql = "DROP TABLE IF EXISTS test; CREATE TABLE test ..."; When i run the script i get Mysql error near ';' create table.. So how do i run this command from my script to i

[PHP-DB] Sql from file

2002-05-26 Thread Dave Carrera
Hi All I have a working mysql statement that i would like to load from a file using my php script It first drops table if excists then creates table then loads sample data I have tried many different ways but no success :-( Any help or ideas would be most appreciated I have a

[PHP-DB] sql statement via var

2002-05-26 Thread Dave Carrera
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 Data

[PHP-DB] refreshing an array

2002-05-23 Thread Dave Carrera
Hi All Thanks for the answer about the cookie issue. I have an array gather from a mysql db, which make a list to show clients no prob. You click on a message in the list sent by my clients customers and answer this message. No Prob there. But when i echo this list on the confirm reply p

[PHP-DB] setcookie warning?

2002-05-23 Thread Dave Carrera
I get this warning with setcookie Warning: setcookie() expects parameter 3 to be long, string given But the cookie works ok this is the line setting the cookie setcookie("selarea",$gotarea,"/" ); any ideas i am using php 4.2 Thanks in advance Dave C -- PHP Database Mail

[PHP-DB] Easy one for you guru's :-)

2002-05-11 Thread Dave Carrera
Hi All Can someone breakdown the logic of adding and subtracting products to a shopping cart using sessions. I can't quite get the logic so something in plain English would help very much. Any helpful advice, pointers or even code examples are very much appreciated. Thank you fully

[PHP-DB] Re: php-db Digest 1 May 2002 19:24:34 -0000 Issue 1181

2002-05-02 Thread Dave Carrera
d add this line right after the GROUP BY: > HAVING count(*) > 4 > This would make the query only return the 5, 3 row. > > Good Luck, > Frank > > On 5/1/02 12:24 PM, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: > > > From: "Dave Carrera" &l

[PHP-DB] Count and group ?

2002-05-01 Thread Dave Carrera
3 2 1 1 Then the result I would like to display is this.. Admin (1) = 3 posts Admin (2) = 4 posts Admin (3) = 5 posts Basically displaying the total post each admin has made Any help or guidance is very appreciated and thank you in advance Dave Carrera Php Developer http

[PHP-DB] Checkbox ?

2002-04-12 Thread Dave Carrera
Hi all I have a checkbox field in a form and want to set a cookie to the values below. Using the code below it always returns "NO" errr why? http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] Apology for htaccess post

2002-04-08 Thread Dave Carrera
user of this list. P.S found the answer to this issue. Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] htaccess quick ?

2002-04-08 Thread Dave Carrera
. P.S got the restrict by ip number sorted I think.. Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] Keep state of a selected field?

2002-04-06 Thread Dave Carrera
the moment. Keep happy Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] saving details problem (big)

2002-04-04 Thread Dave Carrera
all fine and dandy when I added the extra info after postcode lookup but customer insisted he wants it this way round. Customers... (cant live with them, cant live without them...) Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] Please help count ?

2002-04-04 Thread Dave Carrera
is returned in the format shown, so my question might be how I read only the first bit before the space. I fully appreciate any kind of help with this and as always thank you in advance for any help. Dave Carrera Php Developer http://davecarrera.freelancers.net http

Re: [PHP-DB] Pop up are you sure...

2002-04-01 Thread Dave Carrera
allow you to do this. I have come across various probs with JS on client systems so I shy away from it. Again thank you all for your advice. Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] Pop up are you sure...

2002-04-01 Thread Dave Carrera
Hi All How do you do this? On click of button to delete a record make a popup yes / no box appear. On yes then do it else stop. Is it possible to do with out using JS? Thanks for any pointers or code in advance. Dave Carrera Php Developer http://davecarrera.freelancers.net

[PHP-DB] Very wierd problem ;-(

2002-03-27 Thread Dave Carrera
message and cant reply. Got me foxed. What could I be doing wrong? Any ideas as always appreciated. Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] 2 related ?'s email & users

2002-03-25 Thread Dave Carrera
ggestion. I hope someone can help with this. As always I thank you in advance of any help, code samples or pointers. Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] A text file include ?

2002-03-25 Thread Dave Carrera
Hi All, I know how to include the contents of a test file into my app. But at the moment I have to type in tags to make in render properly. Is there a way of reading the contents and dynamically creating paragraph breaks or line breaks? Dave Carrera Php Developer http

[PHP-DB] How to add 2 years to todays date ?

2002-03-17 Thread Dave Carrera
Hi All I think the subject line says it all. How to add 2 years to today's date ? Any helps as always most appreciated. Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com

[PHP-DB] a Count() ?

2002-03-16 Thread Dave Carrera
it has something to do with the GROUP command but the mysql doc dose not make it clear how to achive this task. Code examples, pointers to web resources or any info thankfully received. Thank you in advance Dave Carrera Php Developer http://davecarrera.freelancers.net http

[PHP-DB] Post code / zip code look up ?

2002-03-07 Thread Dave carrera
idea where to start such a task. Any pointers or examples would be most appreciated. P.S how do I implement the Php file upload security fix on a windows based php installation ? Dave Carrera

[PHP-DB] I have a " in my db ?

2002-03-06 Thread Dave carrera
Hi All I think this has something to do with either Stripslashes or Addslashes but which one. And where do I use it. I have a product that has a " in the name and I have created a drop down list from the names. I cant get it to reg the name. all it reg is 15" instead of th full nam

[PHP-DB] Shopping Cart ?

2002-02-24 Thread Dave Carrera
( I think...). Is there some kind of code example for this. As Always thank you in advance for any snippets of wisdom. Dave Carrera Php / MySql Development Web Design Site Marketing http://www.davecarrera.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP-DB] How do I add multiple var to a if clause ?

2002-02-21 Thread Dave Carrera
Hi All If($var == 1,2,3){ } This is wrong so what is the right way. I am try to find out a if var equals either 1 2 or 3 do something type thing but cant find answers anywhere Thanks in Advance Dave Carrera Php / MySql Development Web Design Site Marketing http://www.davecarrera.com

[PHP-DB] RE: I cant get the logic for this...

2002-02-18 Thread Dave Carrera
sql_num_rows($viewres); while( $v1rows = mysql_fetch_array($viewres) ){ $name2 = $v1rows[name]; $id2 = $v1rows[catid]; $simg = $v1rows[smallimg]; $v1list .="$name2"; } } Dave Carrera Php / MySql Development Web Design Site Marketing http://www.davecarrera.com -- PHP Databa

[PHP-DB] I cant get the logic for this...

2002-02-18 Thread Dave Carrera
Always your help and or guidance in this matter is appreciated. Dave Carrera Php / MySql Development Web Design Site Marketing http://www.davecarrera.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Session confusion :-(

2002-02-16 Thread Dave Carrera
please. As Always I am grateful for any pointers or exampled help :-) Dave Carrera Php / MySql Development Web Design Site Marketing http://www.davecarrera.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Deleting from a select list ? :-(

2002-02-14 Thread Dave Carrera
2 where id = '$id2' and name = '$name2'"; $del_res = mysql_query($del_sql,$con) or die ("Unable to Delete Product"); $delproductmsg = "Deleted $name2 from $p_cat_name"; } --ENDS HERE--- Dave Carrera W

[PHP-DB] A while loop prob ?

2002-02-13 Thread Dave Carrera
sql_query($srchsql, $con); $name =$srchrow['name']; $details =$srchrow['details']; $price =$srchrow['price']; $imgloc =$srchrow['imgloc']; while (list($name, $details, $price, $imgloc) =mysql_fetch_array($srchresult)){

[PHP-DB] Select rows where ?

2002-02-12 Thread Dave Carrera
Hi All How do I select the rows that DO NOT contain a certain character. I.e. : select * from tablename where field dose not contain "A" Any pointers as always appreciated. davec Dave Carrera Website Designer http://www.davecarrera.com -- PHP Database Mailing List (http://w

[PHP-DB] Counting db generate links

2002-02-05 Thread Dave Carrera
Hi All How do I count how many time a certain link generated in part from my db has been click so that I can show this number to my visitors as some kind of hit list, top 10 etc: I thank you in advance for any help Dave Carrera Website Designer http://www.davecarrera.com -- PHP Database

[PHP-DB] Selct & show certain num records ?

2002-01-30 Thread Dave Carrera
Hi All I know this has been covered here before but can someone please remind me how to selct just the 5 latest records in my db and show them in list form. Just like phpbuilder.com dose I thank you in advance for repeating this information. Dave C :-) -- PHP Database Mailing List (http://

[PHP-DB] Recalculation ?

2002-01-18 Thread Dave Carrera
Hi All, I have create a page to calculate qtys and show totals. This works fine, except that I change a qty the change is not registered and calculate from the old value. I am using sessions and have try a loop of if($qty == $qty){ than calc stuff here} else{ session_unset($qty); session_registe

[PHP-DB] Reading and Writing ?

2002-01-17 Thread Dave Carrera
Hi All How can I read the contents of 1 file then Write those contents to a newfile? This is baffling me. I Know about fopen,fread,fwrite but cant seem to get the logical steps clear in my head. As always any help or pointers given are most appreciated. Yours Dave C -- PHP Database Maili

[PHP-DB] A local file copy question

2002-01-15 Thread Dave Carrera
I am trying to copy a file on my system from one local place to the path of my script. So... FILE TO COPY = c:\dir\filename.php COPY TO = ../dir/filename.php I need to work out how to determin the local path of my script thus allowing my script to know where ../dir is relitive to. I Think

[PHP-DB] Create Table from a file in php

2002-01-11 Thread Dave Carrera
Hi All I want to create a table from a file that contains the sql to create the table. I have checked Mysql.com and have seen how to do it from telnet, but i want to do it from a php script. Can anyone please help. Thanks in Advance Dave C The two rules for success are: 1. Never tell them ev

[PHP-DB] adding $ to my file

2002-01-08 Thread Dave Carrera
Hi All I am trying to add this to a file on my system $var = $string_submited_by_form All i get when i run the script is an input to my file like this = string_submited_by_form whithou the $var at the beging Can anyone please help. Thanks in Advance Dave C The two rules for success ar

[PHP-DB] I think i saw this somewhere....

2002-01-06 Thread Dave Carrera
Hi All I think i saw a php script somewhere on my web travels, that allows you to include sub domain reg to your web site. it allowed you to offer http://yourname.choiceofdomainname.com so the visitor can have thier name in front of a domain name reged to our webspace. If i remeber right, it

[PHP-DB] product selection from url ?

2001-12-30 Thread Dave Carrera
Hi All Seasons greetings and a Happy new year. How do i selct from my MySql dbase a specfic product from a issued url ie: http://www.domain-name.com/products/?pid=1234 I have seen this done on other sites The idea is to issue a url to my site with the pid so that people who cklick on it only

[PHP-DB] How do i search my database...

2001-11-10 Thread Dave Carrera
Hi All, I have a database with only three fields FIELD 1 FIELD 2 FIELD 3 I want the user to input into FIELD 3, and then my script to go of to my database and see if it finds a match or something like the input and display it to the screen. Please help as i can't seem to get my brain around thi

[PHP-DB] Step through an array

2001-09-08 Thread Dave Carrera
Hi all I have a list of images that i way to step through at 5 second intervals. I think i need to create a timed loop. So i have a list of images: image01 image02 image03 etc: I want to be able to have the script start at image01 and wait 5 seconds then goto image02 and so on. Any ideas

[PHP-DB] A timed refresh ?

2001-09-01 Thread Dave Carrera
Hi All, Could someone please point me to somewhere or give pointers of guidance, to a way of solving this issue. I have an array of which shows an image in a place on my page which shows the next on the list when the page refreshes, this works fine. What I want to do is have the image refresh on

[PHP-DB] counting and displaying a how many figure

2001-08-04 Thread Dave Carrera
Hi All I would like to know how to count how many downloads of a file I have on my site is downloaded and display something like " file.name downloaded times" on my page. I have this idea using mysql db. table files ID int autoincrment, file_name, URL, I believe this would utilise some

[PHP-DB] How do I keep the selected showing...

2001-03-02 Thread Dave Carrera
Hi All I have a fully functional db site which uses 2 sqls and 1 page to give our visitors info they need. That works fine, but some users have remarked that it would be nice that the selected item from our drop down list stays shown when the page gives the info instead of going back to the top o