[PHP-DB] MySQL - Problem with multiple INSERTs?

2001-03-04 Thread Chris
cluded everything below (including table schemata), to enable reproduction. It seems like a bug to me - the question is, is the bug in PHP, MySQL, or my brain? This is driving me CRAZY - Chris mysql_connect("localhost", "myusername", "mypassword"); my

Re: [PHP-DB] MySQL - Problem with multiple INSERTs?

2001-03-06 Thread Chris
workaround, everything seems to be fine when I prime the tables by adding a record; they only seem to have a problem when the tables are empty. Thanks, Chris mysql_connect("localhost", "myusername", "mypassword"); mysql_db_query("DocCountry", "INSERT INTO p

[PHP-DB] Multiple MSSQL Connections

2004-07-02 Thread Chris
, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Query for Most Recent Entry

2004-07-02 Thread Chris
Is the primary key field numerical? If so then you can try to use an sql statement like: SELECT MAX(field) AS max_field FROM table GROUP BY max_field Chris "Jimi Thompson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I'm trying to figure out how to wri

Re: [PHP-DB] Getting PHP for Windows to talk to MS SQL?

2004-07-23 Thread Chris
ctually tried using mssql with PHP, but I *think* the computer may need some libraries installed before the functions will actually work properly. Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] MSSQL INSERT query problem

2004-08-05 Thread Chris
stion,$answer); $res =& $db->execute($sql, $alldata); print_r ($res); if (DB::isError($res)) { $res->getDebugInfo(); die($res->getMessage()); } $db->disconnect(); When I execute it I keep recieving and error message stating: DB Error: syntax error I use PEAR DB and PEAR HTTP SES

Re: [PHP-DB] Zip Code Fields

2004-09-08 Thread Chris
With MySQL you could do this: MEDIUMINT(5) UNSIGNED ZEROFILL Most databases (I think) would have an equivalent of this if you're using something else. Chris Aaron Todd wrote: Just curious, but what kind of field is everyone using to store a Zip Code. I set mine to Medium Integer with a max

[PHP-DB] How use select for update

2004-09-15 Thread Chris
I m trying to make a program with PHP and Oracle I want to use an "Select for upate" But when i send the command, it doesn t lock my "table" If someone can help me -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP-DB] How use select for update

2004-09-16 Thread Chris
Is row-level locking happening? I think that the lock doesn t work When are you checking the locks? I am checking the lock with an SQLPLUS session If i lock my table with SQLPLUS, PHP can make an select for update But if i try to lock with PHP i can make an other select for update with sqlplus So

[PHP-DB] Re :Re: [PHP-DB] How use select for update

2004-09-16 Thread Chris
Escuse me i forgot the "t" > Is row-level locking happening? > I think that the lock doesn t work > > When are you checking the locks? > I am checking the lock with an SQLPLUS session > > If i lock my table with SQLPLUS, PHP can make an select for update > But if i try to lock with PHP i can make

[PHP-DB] mysqli_result() ?

2004-09-17 Thread Chris
Hi, is there any MySQLi equivalent to the mysql_result function? I found one site where a user asked the question, but never got an answer. The documentation doesn't seem to mention it (both MySQL and MySQLi) Thanks, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] mysqli_result() ?

2004-09-18 Thread Chris
Ok thanks, I appreciate the response. Chris Georg Richter wrote: Am Sa, den 18.09.2004 schrieb Chris um 0:50: Hi, is there any MySQLi equivalent to the mysql_result function? Nope. mysql_result is very slow, so we didn't implement it. Use mysql_fetch_row instead and use the row offse

Re: [PHP-DB] Complicated Question (maybe)?

2005-01-10 Thread Chris
olumnname-value combination to update int he database. This is inherently insecure. Chris JeRRy wrote: Hi, I have my reasons in asking this. But instead of going on about it I'll make it quick. Is there a way to BLOCK an update to a column in a databasefrom a webform or php page? What I

Re: [PHP-DB] Trying to figure out the best way to get and output data

2005-01-11 Thread Chris
'[',$aRow['sCategoryName'],"]\n"; $iCategoryID = $aRow['iCategoryID']; } echo $aRow['sSectionName'],"\n"; } That's bare bones, but that is, as far as I know, the best way to do it. Chris Seona Bellamy wrote: Hi guys, I'

Re: [PHP-DB] Notice for those running MySQL on Windows

2005-01-27 Thread Chris
Thanks for the info. Martin Norland wrote: http://it.slashdot.org/article.pl?sid=05/01/27/1546222 Summary: if your mysql is actually listening on the network (not just localhost) you might get wormed - brief perusal says it has to do with weak root passwords. It's basically a spyware worm or som

Re: [PHP-DB] Update/Insert

2002-04-26 Thread Chris
You could try inserting it, and see if it succeeds. If its fails, then you know you have to update it. IE $sql= 'insert...' $result = mysql_query($sql); if(!$result) { $sql = 'update...'; mysql_query($sql); } -Chris At 01:34 PM 4/26/2002 -0400, you wrote: >Hi to al

Re: [PHP-DB] selecting records on a random basis with mysql function rand possible?

2002-05-07 Thread Chris
Why not just get a random number in PHP and do a select statement like that? IE SELECT ID, city FROM data.cities WHERE country = 'CA' and ID = rand() -Chris At 02:52 PM 5/7/2002 +0200, andy wrote: >Hi there, > >is it possible to get mysql to return a record out of a table

[PHP-DB] php -> checkboxes -> mysql

2002-09-09 Thread Chris
Chris 555-12121 0 0 1 = checkbox should be checked 0 = checkbox should not be checked On the webpage side I would have name, address and phone number textboxes, and then 3 checkboxes for the "homeno", "workno" and "pagerno". Wh

[PHP-DB] Authentication - a tough one?

2001-04-24 Thread Chris
within an "NT domain"). Does anyone have any experience in this area that might be able to give me some ideas - at least to get started? Thanks, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP-DB] New to PHP and MySQL

2001-07-09 Thread chris
how to go about it. Thanks for any and all help anyone :-) If you'd like to see my website, it's www.planetoxygene.com and is a Jean-Michel Jarre music website - still under alot of construction but the Guestbook is online so you can see where I am coming from :-) Regards Chris Payne www.planetoxygene.com

[PHP-DB] Paging help needed :-(

2001-07-11 Thread chris
question is, how do I do paging in PHP? I need to display 10 entries per page, and be able to go back and forth with them. I'm relatively new to PHP so I would be really grateful for any advice. Thanks everyone, I appreciate it. Chris Payne www.planetoxygene.com

[PHP-DB] Thank you everyone :-)

2001-07-12 Thread chris
Hi there, Thanks everyone for your help on this list - it really is a credit to the PHP community to have you all out there helping those of us who don't know what the heck we are doing (But who are trying to learn :-) I appreciate it, and I am sure many others do too. Regards Chris

[PHP-DB] Hi there everyone,

2001-07-17 Thread chris
when I go to another page the variable is lost - please help me in simple terms :-) Thanks you everyone. Chris Payne www.planetoxygene.com [EMAIL PROTECTED]

[PHP-DB] Probably a stupid home server question ........

2001-07-17 Thread chris
edhat linux 6.2 with the same - would it be possible to set it up from home bearing in mind my website will be the only site hosted on it? Thanks for any help, it's appreciated. Chris Payne www.planetoxygene.com

[PHP-DB] Still stuck on Sessions :-(

2001-07-18 Thread chris
them? Or am I doing something totally stupid? I've tried it on my Win2000 system AND on my Linux server. Please help, I am getting totally frustrated and need to get all this working within 2 weeks :-( Thank you Regards Chris Payne www.planetoxygene.com

[PHP-DB] A BIG thank you for sessions

2001-07-18 Thread chris
span :-) Regards Chris Payne www.planetoxygene.com

Re: [PHP-DB] Still stuck on Sessions :-(

2001-07-18 Thread chris
Hi Marios, Unfortunately i'm very new to PHP so i'm not sure how to do some of this (Sorry). Cookies are deffinately enabled. Chris > Firstly, try initializing the variable, and then registering. > Also are you accessing the user and pass variables in a function in the >

RE: [PHP-DB] mySQL Autoincrement Field

2001-08-02 Thread Chris
Hi Ralph, Here is how I do it, which is how you suggested. Regards, Chris... #-- CREATE TABLE `test` ( `id` int(11) NOT NULL auto_increment, `browser` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ); INSERT INTO test VAL

[PHP-DB] Re: Get last id in postgresql

2003-06-18 Thread chris
On Mon, 16 Jun 2003 21:13:14 -0500, Norma Ramirez - Tecnosoft <[EMAIL PROTECTED]> wrote: Hi all, I´m starting with posgresql and i trying to use pg_last_oid to get the last id in a insert query, but this function returns me a big number like 21318 and bigger, but the table just have 3 or 4 reco

[PHP-DB] order by an average in another table (basically a "top 10" list)

2003-06-18 Thread chris
I've done a google search, but most of the results are for the part I've already figured out. People that have the "top 10" sorting usually want money for their system (one wanted an absurd $500). I'm working on a database application where users vote on how much they like a particular picture

[PHP-DB] Re: order by an average in another table (basically a "top 10" list)

2003-06-18 Thread chris
On Wed, 18 Jun 2003 16:06:23 -0400, Chris <[EMAIL PROTECTED]> wrote: I've done a google search, but most of the results are for the part I've already figured out. People that have the "top 10" sorting usually want money for their system (one wanted an absurd $500).

[PHP-DB] Mysql: LOCK TABLES

2005-05-01 Thread Chris
lts of the "read" query and RUN the UPDATEs as soon as my PHP app knows it to save on memory usage. Thanks in advance, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] mysql_data_seek problem

2005-05-01 Thread Chris
Just add a check of the total returned rows, and seek to 0 only if there is 1 or more. if(mysql_num_rows($rResult) > 1) mysql_data_seek($rResult,0); Chris Alvaro Cobo wrote: Hi all: I am having problems with the function mysql_data_seek when it refers to an array with an empty recordset (

Re: [PHP-DB] mysql_data_seek problem

2005-05-01 Thread Chris
Sorry, two typos, that should; have been: if(mysql_num_rows($rResult) > 0)) mysql_data_seek($rResult,0); Chris wrote: Just add a check of the total returned rows, and seek to 0 only if there is 1 or more. if(mysql_num_rows($rResult) > 1) mysql_data_seek($rResult,0); Chris Alvaro Cobo wro

Re: [PHP-DB] Mysql: LOCK TABLES

2005-05-01 Thread Chris
Miles Thompson wrote: At 09:01 PM 5/1/2005, Chris wrote: Hi, I've got question on using LOCK TABLES with MySQL and PHP. I don't have a great understanding of LOCK TABLES, but I'll lay out my situation: I've got a table and a PHP function to rebuild several columns in this t

Re: [PHP-DB] [suspicious - maybe spam] How to deal with " ...?

2005-05-04 Thread Chris
ilia03=' . urlencode($row['familia']) . '&cat02=' . urlencode($cat02).'&cat03='.urlencode($cat03).'&cat04='.urlencode($cuadro04); $sURL = htmlspecialchars($sURL); http://www.php.net/urlencode http://www.php.net/htmlspecialchars Chris Ardilla Roj

Re: [PHP-DB] Having a DUH Moment with mysql_fetch_array

2005-05-09 Thread Chris
Thompson, Jimi wrote: Ok, I'm a PHP newbie and I'm having a problem. All I want to do is parse some information out of a database and send someone and email stating that their posting has been approved. I've verified that my SQL is indeed returning the correct value for $key, but when I go to

Re: [PHP-DB] replace question

2005-05-12 Thread Chris
Chris Payne wrote: Hi there everyone, I'm pulling some sensitive data from a MySQL DB with PHP and the clients wants the first x amount of numbers displayed on the screen to be xx etc ... rather than the numbers, but wants the last 6 to be displayed, is there an easy way to do thi

Re: [PHP-DB] undefined Constant

2005-05-15 Thread Chris
[EMAIL PROTECTED] wrote: Please can someone help me? I keep getting this messages below yet the memvars are well defined and loaded with values. What could be the cause? I will appreciate any help. Regards, Bunmi Notice: Use of undefined constant uploadwka - assumed 'uploadwka' in C:\Inetpub\wwwr

Re: [PHP-DB] Letters loop

2005-05-27 Thread Chris
ach(array('A','B','C',...,'X','Y','Z') as $sLetter) { // code } or even use the ASCII values for($i=65;$i<91;++$i) { $sLetter = chr($i); // code } I tend to prefer the first method, but, depending on your situation, one of

Re: [PHP-DB] Issue with date() function...

2005-06-10 Thread Chris
he string '2005-06-10' then converting to a date. Chris Chase wrote: I have a variable: $rec2day = date("Y-m-d"); that displays correctly when echoed to the screen, but when I write it to my DB, I get the mathmatical answer to the equasion (1989 (2005-06-10)). What d

Re: [PHP-DB] Problem with mail funktion

2005-09-17 Thread Chris
search on 'PHP mail "Unknown Error"' got me multiple hits that would at least suggest checking your configuration. Chris Daryl Booth wrote: Hi, I'm trying to set up a simple mail form but the following code: mail($empfaenger,$betreff,$msg,$header); gives me the

Re: [PHP-DB] Problem with mail funktion

2005-09-17 Thread Chris
http://www.php.net/mail Daryl Booth wrote: I'm not sure what should be in the php.ini. Where can I find out what needs to be in the SMTP section? -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Sonntag, 18. September 2005 05:10 To: php-db@lists.php.net Subjec

Re: [PHP-DB] MySQL update statement problem

2006-03-04 Thread Chris
You need to separate the SET arguments with commas, not ANDs... It's really doing something like this: UPDATE shop_customer SET eu_vat_number = ("SK1234567890" AND vat_amount = 0 AND total_amount = 8.4925) WHERE customer_id = 7 AND hash="dcd5e751" ("SK1234567890" AND vat_amount = 0 AND total_amo

Re: [PHP-DB] Ye old $_SESSION variables :)

2006-03-12 Thread Chris
Ron Piggott (PHP) wrote: I am wondering if causes the session_id(); to change or be reset. Some how my $_SESSION[''] variables are "dumping" when I use the POST command above. More importantly I am not sure what to do about it. Any ideas? Ron I have no idea what "dumping" means.

Re: [PHP-DB] Date question

2006-03-12 Thread Chris
Gerry Danen wrote: While I am rebuilding my crashed laptop (the machine that had all my intelligence), I started thinking about a select statement I need. I have log info in a table and want to extract it on a monthly basis. The date field is in -mm-dd format. What's a good way to select tho

Re: [PHP-DB] Text file (rw) question...

2006-03-14 Thread Chris
Rob W. wrote: Ok, The fix is just doing something like this... list($variable, $data) = explode("=", $x); But now my problem is trying to figure out how to update that data with post ect... So the main page would get MaxUser=32 It would read that info and put it in to a form field, which

Re: [PHP-DB] Text file (rw) question...

2006-03-14 Thread Chris
itten to a file. - Original Message ----- From: "Chris" <[EMAIL PROTECTED]> To: "Rob W." <[EMAIL PROTECTED]> Cc: Sent: Tuesday, March 14, 2006 5:54 PM Subject: Re: [PHP-DB] Text file (rw) question... Rob W. wrote: Ok, The fix is just doing something like

Re: [PHP-DB] Text file (rw) question...

2006-03-14 Thread Chris
#x27;post_field'] before just writing it (eg making sure it is only numbers, whatever data you actually want to keep in it). - Original Message - From: "Chris" <[EMAIL PROTECTED]> To: "Rob W." <[EMAIL PROTECTED]> Cc: Sent: Tuesday, March 14, 2006 6

Re: [PHP-DB] Text file (rw) question...

2006-03-14 Thread Chris
f you only want to replace a particular option then that's different - but we don't know what you are trying to do. - Original Message ----- From: "Chris" <[EMAIL PROTECTED]> To: "Rob W." <[EMAIL PROTECTED]> Cc: Sent: Tuesday, March 14, 2006 6:42 P

Re: [PHP-DB] Text file (rw) question...

2006-03-14 Thread Chris
Rob W. wrote: So how do I make it so it just set's the variable's that are sent in the $_POST because i wanna write it so that if the value isnt changed, it wont send the $_POST and wont update the config file.. You can't stop the post because your browser does that not php (well you could st

Re: [PHP-DB] Text file (rw) question...

2006-03-14 Thread Chris
Rob W. wrote: It's all fixed and works. If anybody is wondering how this turned out, here's the begining of the results. index.php "; if ($variable == "MaxUser") { echo "Max Users: "; } if ($variable == "Password") { echo "Password: "; } // echo "$variable $data";

Re: [PHP-DB] Max Size File that can be uploaded

2006-03-14 Thread Chris
[EMAIL PROTECTED] wrote: Dear All, I want to give max size file = 4000KB when I am uploading to mySQL. I used this : But it didn't work. The file that could upload only under 2048KB. Check a phpinfo page and look for upload_max_filesize PHP is probably limiting it to 2M.

Re: [PHP-DB] php crashes with msyql

2006-03-21 Thread Chris
Noah Silverman wrote: Hello, I have a mission critical problem that I cant seem to solve. Can anyone help?? I'll even offer $100 paypal if someone gives me the answer to solve this issue. Thanks, -N -- The issue: when I load a php file in a browser that references

Re: [PHP-DB] php crashes with msyql

2006-03-21 Thread Chris
Noah Silverman wrote: Chris, Same problem Called from the command line it works. Called through a browser, it crashes. php test.php - WORKS http://server.com/test.php - CRASHES What exactly is in test.php (change database details, but we need to see the test.php script) ? Is it

Re: [PHP-DB] php crashes with msyql

2006-03-21 Thread Chris
Noah Silverman wrote: Chris, Thanks in advance for all the help. i appreciate it. The script - -- The error from apache log - [Tue Mar 21 15:36:05 2006] [notice] child pid 19337 exit signal Segmentation

Re: [PHP-DB] Proper procedure to close mysql queries!

2006-03-21 Thread Chris
JeRRy wrote: Hi, Just need some mailing list input here, what is the proper way to close a mysql query using PHP. - What is the proper way to close a php query to mysql if one query is in the file? - What is the proper way to close a php query to mysql if 2 or more queries is in t

Re: [PHP-DB] Proper procedure to close mysql queries!

2006-03-21 Thread Chris
JeRRy wrote: Hi Chris, Thanks for that, always wondered. So what does just using '?>' do than? Must close eventually but I am guessing by using that as a close the connection times out after a set period of time and the 'pid' is killed, correct? If you're

Re: [PHP-DB] php crashes with msyql

2006-03-21 Thread Chris
Noah Silverman wrote: Yes, Same versions.. Hmm. I'm out of ideas :( Might need to post on the -internals list and see if one of the developers can help you with the backtrace. On Mar 21, 2006, at 5:58 PM, Chris wrote: Noah Silverman wrote: Chris, Thanks in advance for all the

Re: [PHP-DB] PHP + OCI en Debian

2006-03-22 Thread Chris
SJL wrote: Someone install any time the Oracle Client to use the OCI interface to connect a Oracle DB? I'm working in Debian. I installed the Client of Oracle from a package from the official page... but I don´t know how to configure php.ini to make the OCI API works.. Now that you've installe

Re: [PHP-DB] Can't Replace File on the Server

2006-03-22 Thread Chris
[EMAIL PROTECTED] wrote: I sent an update to a php script to the server but the page in the browser didn't change. Viewing the file on the server shows the new script. I changed the file name on the hard drive and sent it to the server and the browser didn't find the newly-named file, thou

Re: [PHP-DB] Can't Replace File on the Server

2006-03-22 Thread Chris
e suggests that something like an angle bracket is missing, but I don't find that. How are you uploading the file? php script? ftp program? Other? ** On Wed, 22 Mar 2006 21:23:23 -0500, Chris <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: I sent an update to a php script to

Re: [PHP-DB] if() and else() help needed

2006-03-27 Thread Chris
JeRRy wrote: Hi, I'll admit it, this is damned messy. But I want to learn from the list in how to sort it out. Than for future refrence I will know... Now I am running 2 different queries/statements here completely seperate. I have made the "nickname" field in the database UNIQUE.

Re: [PHP-DB] if() and else() help needed

2006-03-27 Thread Chris
JeRRy wrote: Hi, Yes the user is logged in. The system knows who is tipping by their nickname and unique id system. So if I put the update query in the else statement would this be the easy fix? Don't know - I was offering a suggestion only. Without the full code we can't really help m

Re: [PHP-DB] Cannot connect to MySQL using

2006-03-29 Thread Chris
Warning: mysql_connect() [function.mysql-connect ]: Host '157.47.115.180' is not allowed to connect to this MySQL server in c:\wamp\www\CMS\forecast\includes\db_connection.php on line 10 Error !! Unable to connect to database What s

Re: [PHP-DB] Messenger Question!

2006-04-04 Thread Chris
JeRRy wrote: Not exactly a DB question but the storing will be done in a DB and using PHP. Anyways with the growing demand of IM's I want to add to my site easy access for people contact me. I could add my Yahoo! username for Yahoo! Messenger and MSN Messenger email address but I want t

Re: [PHP-DB] grabbing data and auto email set users

2006-04-09 Thread Chris
JeRRy wrote: Hi, No code here unless required. I run this tipping site. All user details are in a table called tipping which stores their id, username, password, email address, score and others. Than I have tables round 1 through to round 22. (all seperate tables) This i

Re: [PHP-DB] grabbing data and auto email set users

2006-04-09 Thread Chris
JeRRy wrote: Hi, I used the following but got this error: *Fatal error*: Call to undefined function: db_fetch() in */home/tassie/public_html/tipping/admin/check.php* on line *7* As I said: db_query will depend on your database (ie mysql_query or pg_query or other

Re: [PHP-DB] grabbing data and auto email set users

2006-04-09 Thread Chris
JeRRy wrote: Hi, Okay I must be missing something here. I changed it to "mysql_query" and no errors produce however no emails are sent either. After cross-checking back and fourth with my db the entries are correct. A connection is made and establlished. maybe I need to place some eror

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Hi, Okay I played with the code a bit and ended up with this, it does NOT produce errors but it's not doing anything. Connects to the db but does not do the mail out. Maybe I missed something said before, but here you go, the link below with the code. (it's probably basic)

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Hi, Okay I played with the code a bit and ended up with this, it does NOT produce errors but it's not doing anything. Connects to the db but does not do the mail out. Maybe I missed something said before, but here you go, the link below with the code. (it's probably basic)

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Okay, but still not working... is NULL the same as ' '? Or does NULL have to be the inserted value in the db? Null means unknown - so completely different to ' ' or ''. How was your table created? What do you get if you run that query through phpmyadmin: select username from

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Hi, Ahh okay I thought NULL was blank. Okay I understand, therefore, hehe, I fixed it. $query = "select username from round3 where misc=''"; fixed it, the email got sent. Had to change a few strings also to match my database which I was not aware of. Forgot it actuall

Re: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Chris
JeRRy wrote: Okay I have the emails to work now, thanks so much Chris. But now I have encountered another problem, I hope you don't mind helping, I am obviously missing again something basic. Basic than before. I have this code: $result = mysql_query("SELECT `nickname` FR

Re: [PHP-DB] grabbing data and auto email set users

2006-04-11 Thread Chris
JeRRy wrote: Okay here is the full code. Now I got this code off a friend! In this first section to display the data that is grabbed from the db. ", $myrow[0]); } ?> It displays the data fine. Please note in the above there is more code and I

Re: [PHP-DB] listing question

2006-04-11 Thread Chris
Chris Payne wrote: Hi there, I tried something similar: $query = "SELECT * FROM videos WHERE videomakers_website_url = '$x' AND privatepublic = 'public' AND producer_website LIKE '%$x%' OR videomakers_website_url LIKE '%$x%' ORDER BY videomakers_sit

Re: [PHP-DB] multi-table insert

2006-04-30 Thread Chris
Eustace wrote: Hello everybody! I am very much a newbie in PHP, but enjoying the learning process. Here and there I get tangled in the logic of certain problems. Anyway, I have a database about interns and this database has multi-tables told data of interns, for example personal information, educ

Re: [PHP-DB] help in sql - postgresql

2006-05-02 Thread Chris
suad wrote: Hi, I need some help in sql - postgresql: Yay a postgres question! :D hee hee *The question is* : how can I force that the result of the col payed to be zerro "0" insted of nothing (NULL) and the order will be in way that the zerro's values comes first. and the result will be:

Re: [PHP-DB] Sending filing attachments using PHP

2006-05-11 Thread Chris
JupiterHost.Net wrote: Ing. Edwin Cruz wrote: Have a look on this: http://framework.zend.com/manual/en/zend.mail.attachments.html It seems to be easy with zend framework How about a way to do it without having to install a huge system wide binary and configruation that might potentiall

Re: [PHP-DB] mysql searching with fulltext indexing

2006-05-24 Thread Chris
Anyone have any idea how i can query the tables in order to get it to return the indexes show indexes from tablename; http://dev.mysql.com/doc/refman/5.0/en/show-index.html -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubsc

Re: [PHP-DB] Weird database entry

2006-05-29 Thread Chris
Mark Fellowes wrote: I checked my registration table recently and found 3 weird entries. First, this is where someone registers a username and password. The password is generated but encrypted , and an email link must be responded to activate the account , which these were not but it kind of thr

Re: [PHP-DB] php 5.1.4 and PostgreSQL 8.1.4

2006-06-05 Thread Chris
[EMAIL PROTECTED] wrote: I had php 5.1.4 on FreeBSD 5.4 with Apache 1.3.36 and PostgreSQL 8.0.8 for some time and all was OK. The last days I went to PostgreSQL 8.1.4 and since then the PGSQL extension crashes Apache, no matter what I do. I was going to ask if you compiled php yourself but bsd

Re: [PHP-DB] Select distinct field won't return distinct value

2006-06-06 Thread Chris
Blanton, Bob wrote: I'm just learning MySQL so don't know all the syntax. There is a "LIST" function in Sybase Adaptive Server Anywhere which would do that. Is there an equivalent function in MySQL? Query: SELECT distinct niin, list(serial_number) FROM fmds.maintenance_equipment group by niin

Re: [PHP-DB] Question about Classes

2006-06-08 Thread Chris
Andrew Darby wrote: Hello, all. I have a sort of theoretical/sort of dumb question about PHP classes, which I haven't really worked with and don't entirely understand the purpose of, so here goes: Say i want to handle the add or update or delete of an item to a MySQL db, and instead of having t

Re: [PHP-DB] how to get the referrer page details

2006-06-15 Thread Chris
[EMAIL PROTECTED] wrote: Hello all, I am developing a site in which user comes from different site to my site. Now i want to maintain that user comes from which site. I am using $_SERVER['HTTP_REFERER'] for that. Now i came to know that this variable is not supported by some servers or it ca

Re: [PHP-DB] PDO and Exceptions

2006-06-21 Thread Chris
Vandegrift, Ken wrote: Good Afternoon, I have an instance of a PDO object set to throw a PDOException on errors. However, it does not appear to do this when a primary key violation error occurs on an insert sql statement. An exception should be thrown in this case correct? The insert state

Re: [PHP-DB] Conditional updating...

2006-06-25 Thread Chris
Grae Wolfe - PHP wrote: Thank you for the thought, however, I don't have a shell that I can run in, hence, I have to rely on help from others. something like phpmyadmin, phppgadmin will do. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php

Re: [PHP-DB] Count Many Records

2006-06-28 Thread Chris
Kevin Murphy wrote: Actually the design is in the code below I need to display the counts from all of those queries in a grid. Basically, its just a summary of a bunch of information. Another way to look at it would be a several lines that say something like this: You have $data1_count NE

Re: [PHP-DB] LIMIT

2006-06-30 Thread Chris
If you're using MySQL then: SELECT SQL_CALC_FOUND_ROWS * FROM aTable LIMIT 5 SELECT FOUND_ROWS() It's in the mysql documentation under SELECT syntax I believe. Chris Dwight Altman wrote: Is there a way to get the number of rows that would have been returned had there not been a LI

Re: [PHP-DB] Cron & unlink

2006-07-02 Thread Chris
Ron Piggott (PHP) wrote: Does anyone have experience in getting unlink to work within the context of a cron? I created my own garbage collection function and I am trying to delete some session files through a cron that runs every 10 minutes. The session files are owned by 'www' The cron is ran

Re: [PHP-DB] Need Help Compiling PHP5 With MS SQL Support

2006-07-03 Thread Chris
Mike wrote: I am new to Linux and have NEVER compiled PHP. I have PHP 5 and need to compile it with MS SQL support. Per PHP docs, I installed FreeTDS and tested it and it works. Now I need to (re)compile PHP to get the support I need to access MS SQL databases. I am on a Ubuntu 6.06 version of Li

Re: [PHP-DB] splitting string from database

2006-07-03 Thread Chris
Dave W wrote: Hi, I am trying to take a number from a MySQL database and then split it into different strings using a comma. It's for display a cash amount into a table. It's stored in the database as something like 100 and I want for it to display as 1,000,000 on the table. http://www.php

Re: [PHP-DB] Uploading multiple files?

2006-07-04 Thread Chris
J R wrote: got curious of evans question. is there a way whithout having multiple "" form to upload multiple files. only one input field but when browse is click and the file selection window poped, multiple files can be selected at once and then uploaded. I was going to say no, but then I fo

Re: [PHP-DB] Do while loop inside of mail()

2006-07-05 Thread Chris
Mark Bomgardner wrote: MySQL 4.1/PHP 4.2 I am trying to generate a email to send to people with a list of events happening through out the month. I am pulling the email addresses from the database with no problem, but when I put the list of events inside of the mail(), it barks at the do wh

Re: [PHP-DB] Re: posting information from a textarea

2006-07-06 Thread Chris
Dave W wrote: I saw this bug: http://bugs.php.net/bug.php?id=22427. Could this be related to problem I'm having? Simplify your example and test it, only way to know. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP-DB] Re: posting information from a textarea

2006-07-06 Thread Chris
Dave W wrote: I saw this bug: http://bugs.php.net/bug.php?id=22427. Could this be related to problem I'm having? Actually, show us the form you're trying to submit before doing anything else. Since we haven't seen any html or php code, guessing it's a bug is a bit of a stretch. -- Postgres

Re: [PHP-DB] Taking care of an auto_increment field!

2006-07-06 Thread Chris
Is there a way to use transactios in MySQL?? Of course. They only work properly with innodb tables though. This is all in the mysql documentation (http://dev.mysql.com) Or maybe using a global variable accesed by all the processes running in the server? You could create a global 'sequen

Re: [PHP-DB] Re: posting information from a textarea

2006-07-06 Thread Chris
Dave W wrote: I'll show you all the steps it passes through. Here's the form: Motto: value="value("motto") == ""){ echo $session->nationinfo['motto']; }else{ echo $form->value("motto"); } ?>" /> Nation Description:

Re: [PHP-DB] Interacting with server without a refresh?

2006-07-17 Thread Chris
Jeffrey wrote: This veers a bit from PHP, but is relevant. I am building an interactive workshop tool using php and mysql. I want the facilitator to be able to control which pages the participants see and to be able to control the data that appears on the page. The obvious way to do this woul

Re: [PHP-DB] DB2 - wrong number of parameters

2006-07-17 Thread Chris
Pablo Garay wrote: Hi! I´m working with PHP 5 and using the DB2 database. I´m trying to update a jpg file, that´s save on the database. here´s the code: $fp = @fopen("$caminho/$nome_arquivo", 'r'); $content = fread($fp, filesize("$caminho/$nome_arquivo")); $content

  1   2   3   4   5   6   7   8   9   10   >