PDA

View Full Version : needing php/mySQL help.



[Oli]
07-01-2007, 07:16 PM
As some might remember, I am making a website like templatemonster or 4templates where any designers, from newbie's to experts can post their designs.

Unlike sites as templatemonster and 4templates, my site would be free of charge to post.

Now, I've got the site ready for about,.. 75%.

There's still 3 bugs to fix, and 1-2 features to add.

Bug/Error 1:
--------------------+

I've got a usersystem on the site.
Now, I asume everyone knows Cutenews.

When you are NOT logged in in the usersystem, you are able to read the full story when you click Read more.

But, when you ARE logged in, and you click Read more, you will get this error:

''Can not find an article with id:1''
--------------------+


Bug/Error 2:
--------------------+

I am trying to include an upload script into my posting script, so u can upload a thumbnail.

Ofcourse in an upload script you need to locate a folder where the uploads will be uploaded in. I've located the folder correctly but I always get:

The folder (folder here) doesn't exist.

--------------------+


Bug/Error 3:
--------------------+

I have tried to make a SQL search form, where you fill out some content, and it would search trough the database for the posts(templates) with these contents.

When search, I get this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE price = '2000' WHERE prefix = 'psd only' WHERE style = ''' at line 1



The site where all this is located = www.oli.dediwebspace.com

If you need a certain part from a php file or something, let me know, and I'll post it.

Thanks in advance!
+rep if possible to people who are able to help.

Mentor
07-01-2007, 08:08 PM
Error 1: its a glitch i used to make use of, when i first installed the thybag usersyetem, basicly the varibles cutenews pulls from the GET headers are only stored when the varible has not already been set.
Hence meaning you can artifcaly set a varible in the script to what ever you like.

To fix it your going to need to check and change a few vearible names, some varible is being used, when a user is logged in which is the same as what cutenews is useing to get the news topic id.

Error 2
cant really help as without your upload code i dont know the problem

error 3 is the easiest of them all, you used the syntax a bit wrong. you should have

"WHERE price = '2000' AND prefix = 'psd only' AND style = ''' "

Aka you only say WHERE Once. For any futher statments just use ether AND or OR depending on your needs

Dentafrice1
08-01-2007, 02:09 AM
Error 1: its a glitch i used to make use of, when i first installed the thybag usersyetem, basicly the varibles cutenews pulls from the GET headers are only stored when the varible has not already been set.
Hence meaning you can artifcaly set a varible in the script to what ever you like.

To fix it your going to need to check and change a few vearible names, some varible is being used, when a user is logged in which is the same as what cutenews is useing to get the news topic id.

Error 2
cant really help as without your upload code i dont know the problem

error 3 is the easiest of them all, you used the syntax a bit wrong. you should have

"WHERE price = '2000' AND prefix = 'psd only' AND style = ''' "

Aka you only say WHERE Once. For any futher statments just use ether AND or OR depending on your needs
Added on from what Carl said also you may want to add `s as it may error.


WHERE `price` = '2000' AND `prefix`= 'psd only' AND `style`=' '

Mentor
08-01-2007, 07:14 PM
Thats only really a problem if you accidenly name a colum with a SQL command name... somthing ive unluckly done with thybag, and makes it a ******* to reinstaller since most sql backuping systems dont add the ` 's

So in terms of good practis, its probably a good idea to do so

Dentafrice1
08-01-2007, 11:01 PM
Never expierenced that. I don't use the `s unless I make something try to make it look professional.

Heinous
09-01-2007, 09:36 AM
Regarding error#2, is the folder CHMOD'd correctly? And are you using the full path to your folder?

Want to hide these adverts? Register an account for free!