Re: [PHP] how to read a specific "cell"
seb, it would help to post the actual table structure jozef Sebastien Pahud wrote: Hello, I cannot figure out how to read a specific "cell" in a result i got from a SQL request. I have a SQL request on a database: SELECT nameAttribute, fr, de, en FROM traduction WHERE nameTable = 'whatever' AND idTable = 1 ORDER BY nameAttribute and i am suppose to get something like this : - | msg | bonjour | gutentag | good morning | - | time | diner | essen | lunch | - | weather | beau | schön | nice| - I always know how many rows i am suppose to get. Now, how can i get the word "schön" for example out from that table ? I need to get it specifically, and not all the row. $table['de'] will return the 1st one. (Gutentag in my example) I need the 3rd one... or the 2nd... and so on. $table[2][2]; or anything like this doesn't seem to work. mysql_fetch_assoc, mysql_fetch_row, mysql_fetch_array Well, what and how should i use this Hope you got my broken english Thanks Seb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Designer 2005
Well, it does help to know that pther people are using the product on multiple machines and are not having problems. It may be that there is something conflicting with the program. HE may have not yet looked into that? He also may have a memory problem. PHPD2005 does not seem to eat up resources. If he likes the program, knowing other people use it fine in many settings may lead him to look for other root causes John Nichel wrote: Joseph Connolly wrote: Sorry, but i have had NO problems with PHP Designer 2005 I have it running on 3 machines...never a problem with memory usagei think it is the greatest thing since sliced bread. That doesn't exactly help the OP does it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Designer 2005
Sorry, but i have had NO problems with PHP Designer 2005 I have it running on 3 machines...never a problem with memory usagei think it is the greatest thing since sliced bread. Jason Barnett wrote: The Disguised Jedi wrote: Some might consider this OT, but I need to figure this out somehow, and google has been no help. I downloaded and installed PHP Designer 2005, and I really like it so far, but I'm having some problems. Any time it is running, my CPU Usage goes up to 100% and the process "phpDesignerPrg.exe" is the culprit. My fan kicks into overdrive, and my laptop gets really warm. The funny thing is, any time I've never used this program and no offense to you but I'm not going to download it if it's going to eat my CPU. ;) If the vendor doesn't provide the customer support that you need then it might be time to get another vendor. What does PHP Designer 2005 do? If it's just an IDE then there are other (well supported) options out there including VIM, Zend, Crimson... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] step by step learning
hey paul, php is not like html. HTML is a markup language and PHP is a scripting languange. Once you get through installing PHP, it is not like HTML where you start with the basic tags and learn them one by one. PHP has functions and you need to know which funcitons you need for the right job. I would recommend phpfreaks.com. That is where I started and probably a beginners book or a reference book. If you do not have any programming experience, you are best off getting a beginners guide which will explain concepts along with the code. PHP is easy to use, but not quite as easy as HTML and CSS. PHP also has an online manual with examples which is on par with no other manual that I have found (with the exceptionn of maybe MySQL). So looking up functions online on their site is also a good starting place. jzf Paul Kain wrote: Hi there are there any sites online that show one how to learn php in a step by step fashion? I am really lost and would need to start at the very beginning I already know and understand html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading file
Thanks for the info. That makes sense. John Nichel wrote: Joseph Connolly wrote: I though you could limit it in the php.ini file. OR, you can determine it's length through php and then discard it. I remember reading something about limiting file size and overidding that limit in the script. If i find it i will post it here. You can limit it with PHP. However, for php to determine the filesize and check it against the limit, the file has to be uploaded first, ie on the server. The OP wants to check the filesize while it's still on the client machine, and PHP can't do that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading file
I though you could limit it in the php.ini file. OR, you can determine it's length through php and then discard it. I remember reading something about limiting file size and overidding that limit in the script. If i find it i will post it here. Richard Davey wrote: Hello Marc, Wednesday, April 13, 2005, 3:08:06 PM, you wrote: ms> Hi, i want to create a form to upload a file on a server. My ms> problem is that i want to check the filesize before sending it ms> because if the filesize is superior than 2 MB it failed and i ms> don't want to wait for a long time for uploading a file that will ms> fail. This isn't possible with PHP alone. You could do it by using some kind of client-side uploader (Java applet, maybe a JavaScript post-back, etc), but not PHP by itself. Best regards, Richard Davey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpmyadmin blank screen.
1- are you loading the mssql extensions or the mysql extensionsyou keep interchanging the two and they ARE NOT the same 2- in addition you may have to load the mysqli extension if you want to run phpMyAdmin. 3- re read the php manual and the phpMyAdmin If the screen is blank trying to read the source code to see if there is anything at all there. Then make sure php is running correctly and your databases are running correctly...i have a feeling one or both might not be. THEN, you have to make sure your extensions are compatible with the new password authenticaiton method begin used by phpMyAdmin. (this is where mysqli come into play). Ross wrote: Thanks for the replies to my php_mssql problem. I have a problem that when I try and run phpmyadmin locally the screen is just blank. Any ideas? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple Problem
I think what you mean/need is: $sql="SELECT products.productID, products.title, products.number_per_box, products.stock_level, products.image, users.username, users.email, users.userID FROM users, products WHERE products.userID = users.userID AND userID = $userID"; John Nichel wrote: PartyPosters wrote: I can't figure out what I am doing wrong, this sql string seems to filter out the information I want but it duplicates the all info, as 'num_rows' is total of rows in the table and not the correct value of the filtered information? $sql="SELECT products.productID, products.title, products.number_per_box, products.stock_level, products.image, users.username, users.email, users.userID FROM users, products WHERE products.userID = $userID"; $mysql_result=mysql_query($sql,$connection); $num_rows=mysql_num_rows($mysql_result); this is the old sql statement which works fine - $sql="SELECT productID, title, number_per_box, stock_level, image, userID FROM products WHERE userID = '$userID'"; $mysql_result=mysql_query($sql,$connection); $num_rows=mysql_num_rows($mysql_result); http://lists.mysql.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] another non php Q
www.w3.org http://www.w3.org/MarkUp/html3/textarea.html wrong list though William Stokes wrote: Is there a way to limit a size with som sort of a maxlength value I know it's not php but thanks anyway -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php rich text editors
1- i like php designer. It is free cross platform and does everything i need. They also make a html editor calle 'html gate' mpsoftware.dk 2- you could use google 3-go to http://www.php-editors.com/ which has many tools and forums DuSTiN KRySaK wrote: Problem with that one - does not work in safari (on the mac). d On 7-Apr-05, at 11:22 AM, Ben Ramsey wrote: DuSTiN KRySaK wrote: Can anyone refer me to anything that will work with PHP? Just need it for a blog type application. FCKEditor works well, has a PHP version, and is cross-browser: http://www.fckeditor.net/ -- Ben Ramsey Zend Certified Engineer http://benramsey.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sql question
if i understand you question... SELECT columns FROM table WHERE (condition #1) AND (condition #2); You can add many conditions. There are many ways to do this. This one is probably the most simple for only two conditions. Depending on your needs you also may need to create a subquery. SELECT colummns FROM table WHERE (condition#1) AND ( SELECT columns FROM table WHERE (condition#1a); The second is more useful in joins or when joining a table to itself. William Stokes wrote: Hello, This is not a php but sql question. My apologies but I don't know any good sql forums and I know that someone here might be able to answer. OK so the question is. How to make a SELECT query with WHERE definition that requires 2 conditions to be satisfied so that the row gets selected? MySQL manual says"where_definition consists of the keyword WHERE followed by an expression that indicates the condition or conditions that rows must satisfy to be selected" I just don't know how to write the query Thanks a lot -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with SQL Query String
well...i would have told him to go pound sand...the php manual is great and so is the MySQL manual. People are just lazy. [/snip] Ya'll bitch when I make them RTFM, ya'll bitch when I do codewhat's a guy to do? j/k Actually http://dev.mysql.com/doc/mysql/en/string-functions.html shows that MySQL also has a trim function which could be applied thusly; $sql = "INSERT INTO tblname (USERID,FULLNAME,SSN,STARTDATE) "; $sql .= "VALUES ( "; $sql .= "TRIM('" . $row['USERID'] . "'), "; $sql .= "TRIM('" . $row['FULLNAME'] . "'), "; $sql .= "TRIM('" . $row['SSNO'] . "'), "; $sql .= "TRIM('" . $row['STARTDATE'] . "') "; $sql .= ") "; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with SQL Query String
You should not just give him the code but rather tell him why. 1. trim() is a php function. MySQL does not know what to do with it. You need to place it 'outside' of the sql. You can also do something like this: $userid = trim($row['USERID']); Then use $userid in your sql. 2. Items in arrays must be in quotes. jzf Jay Blanchard wrote: [snip] $sql = INSERT INTO tblname (USERID,FULLNAME,SSN,STARTDATE) VALUES (trim($row[USERID]),trim($row[FULLNAME]),trim($row[SSNO]),trim($row[STAR TDAT E])); [/snip] Time to quote and concatenate and make pretty... $sql = "INSERT INTO tblname (USERID,FULLNAME,SSN,STARTDATE) "; $sql .= "VALUES ( "; $sql .= "'" . trim($row['USERID']) . "', "; $sql .= "'" . trim($row['FULLNAME']) . "', "; $sql .= "'" . trim($row['SSNO']) . "', "; $sql .= "'" . trim($row['STARTDATE']) . "' "; $sql .= ") "; This will make things easier to maintain as well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Insertion of integer in a database
I don't think the integer is the problem, but if it is you can turn time() into a variable and then, $time = time(); david joffrin wrote: Hi folks, Problem is fairly simple, but how can I insert integer in an SQL statement? So, I only had strings, but now I have introduced a timestamp column (bigint to cover the milleseconds), and I have the following statement: $queryInsert = "INSERT INTO mytables (..., timestamp) VALUES ('"; $queryInsert .= ...; // several columns $queryInsert .= "', '"; $queryInsert .= time() . "')"; $result = mysql_query($queryInsert); This is not working as time() returns an integer and .= only works with strings! How can I cope with that? Thanks. DvJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php