Topic: "mysql databases" (page 1 of 1)

1
Author Post
sniperkid
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
is there a way to change a field in a database then check to see if it is in there;
F.E

field
points contains js1 js2 js3
is there a way of checking it to see if js3 is there or would it just check the whole string to see if it equals js3????
private message Website
unknown user
well, If I have understood what you want to know (and I'm not sure) you could just check if in that line js3 <> null.

Hope this helps.
sfabriz
EMail
sniperkid
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
im trying to think up a way of doing a rankup script, and i thought it might work like this...

user ----- points
test js1, js2, js4
ect

and i was wondering whether you could check to see if points contains "js3" for example.
private message Website
S0410N3
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
select count(*) from table where test like '%js3%' and user='username' ... ? (to see if js3 is in the field test)

An other way would be to extract the test field and check it by doing an if(strstr($test,"js3")) in php by example. Without using "like" like above I don't think it's possible only by the request.

Hmm, maybe I don't really understand the question...
private message Website
sniperkid
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
ok in php is it possible to do something like this (i know its possible in perl but i hate using perl when making websites...)

open file test.txt

test.txt contains
1
2
3
ect

store whole file in an array

split them up

$ex1 = @array[0]
$ex2 = @array[1]
ect.

??????????
Edited by sniperkid on 29.11.2004 17:56:58
private message Website

Topic: "mysql databases" (page 1 of 1)

1