-
Posts
3,372 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Muddy_Funster
-
what exactly is going on here? : for($i = $fromTIME; $i <= $toTIME; $i = strtotime('+1 day', $i))
-
How to get next two records in PHP and MYSQL
Muddy_Funster replied to Dharmender's topic in PHP Coding Help
If it's only showing a single row then you're doing it wrong. There was a reason I used the words "tried and tested". -
stop using frames.
-
change ASC to DESC?
-
Parse error:syntax error,unexpected if (T_IF)
Muddy_Funster replied to xanie's topic in PHP Coding Help
you didn't put the ; at the end of the include line just before the IF. thus you didn't terminate the line and PHP was taken unaware when it fame up against the IF. -
How to get next two records in PHP and MYSQL
Muddy_Funster replied to Dharmender's topic in PHP Coding Help
don't use a foreach loop for database results. this is especialy true when using mysql_fetch_array as it will provide double the results that are looking for. The tried and tested method: $sql = "SELECT id, name FROM supplierinfo LIMIT 3"; //your SQL changed to only get the 3 results $result = mysql_query($sql) or die(mysql_error()); //execute the query while($row = mysql_fetch_assoc($result)) //while there are records then step through each row and fetch data into an associative array called $row { //display record by using $row['name'] and/or $row['id'] } -
Parse error:syntax error,unexpected $event_date' (T_VARIABLE)
Muddy_Funster replied to xanie's topic in PHP Coding Help
the issue is most likely in the code previous to that line. show 10-15 lines either way of your actual code, posted inside code or php tags, and we'll see -
how to store chained selection to mysql ?
Muddy_Funster replied to Manhag's topic in PHP Coding Help
first off that's javascript, not PHP, secondly, to answer your question, by writing a script that will connect and insert information to the database. It's not standard practice for the people on this forum to give away code on request to copy and pasters who arn't actualy coding anything themselves. If your coding it show us, if you're looking for another piece of code to just copy and paste then I'll not be giving it to you. -
erm...I'm not trying to be insulting, but if this is for an actual-use piece of software then you're not qualified to build this. There are leagal constaints to the numbering of invoices and quotations that must be strictly adheared to (as well as easily auditable and completly transparent) or else the goverment will - sooner or later - fine the life out of the company using it. You have not displayed in these posts the level of competence that would be required of somone to properly write a system as highly regulated and business critcal as this. If it's a just-for-fun / educational project however, then I wish you the best of luck and the utmost success with it
-
ok, as far as I know you can only have a single auto inc field in a table at a time. that said.....WTF are you actualy trying to do here, because I can't make what you posted fit for any logical scenrio. your sample dataset doesn't even follow any obvious pattern
-
You are printing the category....
-
Try looking into glob() for getting file names. You will need to know the path that the files are stored in.
- 1 reply
-
- php
- javascript
-
(and 2 more)
Tagged with:
-
XAMPP Folder Permission Issues when trying to Upload
Muddy_Funster replied to rosebudthegreat's topic in PHP Coding Help
folder permissions would be set in the operating system, which with xamppp will either be windows or MacOS. For windows right click on the folder that you want to upload to and, assuming you are an admin level user, choose properties from the context menu. From here click on the security tab and then click on the advanced button followed by the Change Permissions Button and then the Add Button. In the large box in the bottom half od the prompt that comes up (should be the default focus for the cursor) type the word Everyone and click OK. Put a tick in the left hand Full Control checkbox in the list that comes up (headed Allow) and click OK. Now OK/Apply/Finish back to the explorer and your folder is now open to Everyone. -
did you even read that before you posted it? $q = "SELECT product_id, product_title, family_name, prod.id_family, <<--- prod is not a table fam.id_family <<---fam is also not a table. Why would you want the same information twice anyway? FROM products <<-----no alias applied to the table name LEFT JOIN family <<-----as above ON prod.family_id = prod.family_id"; <<----your linking the same field in the same table to the same field in the same table!!
-
You need to use a JOIN to link the tables using the relational column. Something like this : $query = <<<SQL SELECT field, name, list FROM t_products LEFT JOIN t_families ON(t_products.id_family = t_families.id_family) ORDER BY product_titulio_esp SQL;
-
why not just go ask your tutor?
-
let's see your updated code so we can see what's happening now.
-
First thing, Welcome to the forums. There are a couple of things I'd like to cover. first is Don't use Dreamweaver for coding PHP. It's a good design tool, but sucks ass as a development tool (IMO). I would suggest a couple of alternatives : eclipse (if you don't mind learning how to set it up with php support) pspad/notepad++/sublime text - these are text editors that provide code highlighting and syntax help As much as I hat to say it Microsoft Expression Web 4 is a decent paid for solution Zend Studio 9 is also a paid for IDE (Integrated Development Environment) that comes with a few extras (but a somewhat over zealous error detection) Next up, when posting code in the forums please wrap it inside either php or code bbtags. Finaly, to address the problem with the code, you need to wrap your database insert section of the script inside an else for your logic check. so some simple psudocode would look like this : IF no email entered OR IF email is bad > Show Error ELSE > Add email to database
-
Well good for you. I am so pleased the the one person here that we all know can't solve the problem feels that they are clever and providing enough information. You know what, if you don't want help stop asking crap questions and go play on a different forum. If you do want help, stop being a wise ass and work with the people that are trying to help you. I am not going to give someone credit to their inteligence when they are describing a programming issue with the childish simplicity that you did. Untill you can evidence your mantal capacity as being something more, I and many others are going to start at the bottom of what your post suggests you can handle and work up as the responses build - and to be honest, your still at the bottom. Neither Jessica nor myself have a great love of lazyness, bad attitudes or idiots. We all come here in our own time to help others with thier scripts getting no return to oursleves for doing it, we're not going to lie down and take crap from you as well.
-
having trouble drawing from db to excel file
Muddy_Funster replied to fabiez's topic in PHP Coding Help
I was looking for information like the following sample I have taken from a table in my sandbox: uid int(11) unsigned NO PRI auto_increment headline varchar(254) NO MUL article text YES postTime timestamp YES MUL CURRENT_TIMESTAMP expireDate date YES MUL postStatus char(1) NO MUL 1 Edt . formating in this new forum really neads some work. -
you got me beat. It's just a shame that mail() doesn't do any really usefull error capturing. mybe you would be as well using the phpmailer lib?
-
having trouble drawing from db to excel file
Muddy_Funster replied to fabiez's topic in PHP Coding Help
not quite what I was after - can you run DESCRIBE cards and post the results please? -
I seen in the image you popsted that you had changed the From text as well as the address, I assume you have tried it both ways? Also, the other dmains that you are testing it from - do they exist? are they real domains or just something you made up? have you tried the script from a server that has an MX record pointing to it from the actuial domain? if you have access to the domain name settings you can just point an MX record at your dev box's global IP tempereraly for testing purposes.
-
having trouble drawing from db to excel file
Muddy_Funster replied to fabiez's topic in PHP Coding Help
could you post your table structure please? -
Call To Undefined Function Mysql_Connect() Revisited....
Muddy_Funster replied to ack's topic in PHP Coding Help
that message means lthat you are trying to insert a new record that has the same value as an existing record in a column which has been set with a unique index (normaly a primary key, but any unique index field - it's why it helps to have indexes with relivent, logical, human friendly names)