Search found 132 matches

by blade_922
Sat Apr 16, 2011 11:29 am
Forum: PHP - Code
Topic: MYSQL insert id in url
Replies: 5
Views: 2008

Re: MYSQL insert id in url

Thank you Social_Experiment for pointing me in the right direction, i have worked it out.

Thank you.
by blade_922
Sat Apr 16, 2011 10:39 am
Forum: PHP - Code
Topic: MYSQL insert id in url
Replies: 5
Views: 2008

Re: MYSQL insert id in url

Im trying as hard as i can, im at the point the url is saved into the DB but as a new row and, for some reason the script ended up creating 20000 rows or so! So i figured INSERT INTO will create a new row, so have changed it to UPDATE to update the row, because the row already exists. So im at this ...
by blade_922
Sat Apr 16, 2011 10:23 am
Forum: PHP - Code
Topic: MYSQL insert id in url
Replies: 5
Views: 2008

Re: MYSQL insert id in url

I managed to echo out all the urls which are perfect, they just arent storing into the mysql DB
by blade_922
Sat Apr 16, 2011 9:06 am
Forum: PHP - Code
Topic: MYSQL insert id in url
Replies: 5
Views: 2008

Re: MYSQL insert id in url

Hi Social_Experiment, Thanks. I did just what you suggested and loaded the page that code was on. Checked the DB and there were no URL's updated. Also, around 1000 urls have already been entered so i dont want those to be changed. Only where the box column is NULL should they be filled with the url....
by blade_922
Fri Apr 15, 2011 2:49 pm
Forum: PHP - Code
Topic: MYSQL insert id in url
Replies: 5
Views: 2008

MYSQL insert id in url

Hi, I have around 5000 rows in mysql each with unique i.d. Now a field in each row caled boxart holds the url to an image i.e images/uploads/abcdef.jpg Now i have had a brainwave to save me alot of time. I have around 3500 images to upload, so i will upload these via FTP instead of individually. Eac...
by blade_922
Thu Apr 14, 2011 4:58 pm
Forum: PHP - Code
Topic: Remove character from string
Replies: 8
Views: 1017

Re: Remove character from string

hhhmmm, STRTOLOWER converts everything to lower case. What if i dont want this to happen? How can i stop this form happening when i remove the characters?
by blade_922
Thu Apr 14, 2011 4:32 pm
Forum: PHP - Code
Topic: Remove character from string
Replies: 8
Views: 1017

Re: Remove character from string

Hi danwguy,

I get this error when i use what you put.

Call to undefined function srt_replace() in /home/public_html/videogamingcave/aaa/img/gameslist.php on line 33
by blade_922
Thu Apr 14, 2011 1:43 pm
Forum: PHP - Code
Topic: Remove character from string
Replies: 8
Views: 1017

Re: Remove character from string

Is there a way around this?
by blade_922
Thu Apr 14, 2011 1:00 pm
Forum: PHP - Code
Topic: Remove character from string
Replies: 8
Views: 1017

Re: Remove character from string

Hi, Understood. It did what it was supposed to. BUT not what im trying to achieve. What it is, i have around 5000 images that are named like the following $id-$name-$category.jpg Now im trying to insert the url of these images into the according row on the mysql database. The $id $name and $category...
by blade_922
Thu Apr 14, 2011 11:52 am
Forum: PHP - Code
Topic: Remove character from string
Replies: 8
Views: 1017

Remove character from string

Hi, Having a bit of trouble. $boxart - holds a url with the name of a game, contains punctuation such as : and ! which i need to remove. I have tried below with no luck. $boxart="images/uploads/ds/$id-$name-$console.jpg"; $boxart = array(":"); $new_box= str_replace($boxart, ' ', ...
by blade_922
Wed Apr 13, 2011 6:33 pm
Forum: PHP - Code
Topic: PHP Code or MYSQL query?
Replies: 2
Views: 272

Re: PHP Code or MYSQL query?

Okay worked it out.

BUT

when i echo image out as <img src"..."> SOME images show up and some dont even though the URL is spot on. Why is this?

Like

images/uploads/ds/1419-LEGO Indiana Jones The Original Adventures-ds.jpg

It wont show up
by blade_922
Wed Apr 13, 2011 6:21 pm
Forum: PHP - Code
Topic: PHP Code or MYSQL query?
Replies: 2
Views: 272

Re: PHP Code or MYSQL query?

Okay, got the list of games coming up in a list with their id and name and console. Now im echoing the url first of the game. So need a bit of help. I have $id=$row['id']; $name=$row['title']; $console=$row['category']; $boxart="$id-$name-$console.jpg"; echo $boxart; And i get 0jpg coming ...
by blade_922
Wed Apr 13, 2011 6:09 pm
Forum: PHP - Code
Topic: PHP Code or MYSQL query?
Replies: 2
Views: 272

PHP Code or MYSQL query?

Hi all, Im a beginner with PHP code, but have written quite a few data entry scripts in my time. Its been a while so i will explain what im trying to do, and if someone could tell me the best way to go about writing the code. i will try write it and ask for someone to check for mistakes. I have a my...
by blade_922
Mon Jan 17, 2011 2:55 pm
Forum: PHP - Code
Topic: Something stopping data entering mysql db
Replies: 2
Views: 206

Something stopping data entering mysql db

Hi, I cant seem to find what it is, I've tried everything but the data is echo'ing out okay on the page but it wont insert into my db. I've checked the db connection, that is fine also no typo's that i can see. HELP :banghead: :banghead: <?php include('db.php'); ?> <?php $title=$_POST['title']; $dat...
by blade_922
Mon Jan 17, 2011 2:11 pm
Forum: PHP - Code
Topic: date into unix timestamp
Replies: 5
Views: 374

Re: date into unix timestamp

Depending on timezones and how you set them: PHP strtotime($date) MYSQL [text]UNIX_TIMESTAMP($date)[/text] Hey Thanks, So let me get this right, in my php file i would put $unixtimestamp = strtotime($date) The above converts it into the unix timestamp? Where would UNIX_TIMESTAMP($date) go?